| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
This is a common pattern with dyn_cast and similar constructs, when the
PHI no longer depends on the select it can often be turned into a simpler
construct or even get hoisted out of the loop.
PR15340.
llvm-svn: 175995
|
|
|
|
|
|
|
|
| |
The 'nobuiltin' attribute is applied to call sites to indicate that LLVM should
not treat the callee function as a built-in function. I.e., it shouldn't try to
replace that function with different code.
llvm-svn: 175835
|
|
|
|
| |
llvm-svn: 175804
|
|
|
|
| |
llvm-svn: 175658
|
|
|
|
| |
llvm-svn: 175568
|
|
|
|
| |
llvm-svn: 175567
|
|
|
|
| |
llvm-svn: 175565
|
|
|
|
| |
llvm-svn: 175562
|
|
|
|
|
|
| |
No functionality change.
llvm-svn: 175364
|
|
|
|
|
|
| |
trying to do.
llvm-svn: 175014
|
|
|
|
|
|
| |
avoid a second pred_iterator traversal.
llvm-svn: 175001
|
|
|
|
|
|
|
| |
(through a loop), don't continue to iterate through the reamining
predecessors.
llvm-svn: 174994
|
|
|
|
|
|
| |
for tidiness' sake.
llvm-svn: 174988
|
|
|
|
| |
llvm-svn: 174985
|
|
|
|
|
|
|
|
|
| |
Handle chains in which the same offset is used for both loads and
stores to the same array.
Fixes rdar://11410078.
llvm-svn: 174789
|
|
|
|
| |
llvm-svn: 174786
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the SCEV vector size in LoopStrengthReduce. It is observed that
the BaseRegs vector size is 4 in most cases,
and elements are frequently copied when it is initialized as
SmallVector<const SCEV *, 2> BaseRegs.
Our benchmark results show that the compilation time performance
improved by ~0.5%.
Patch by Wan Xiaofei.
llvm-svn: 174219
|
|
|
|
|
|
|
| |
reference to a pointer, so that it can handle the case where DataLayout
is not available and behave conservatively.
llvm-svn: 174024
|
|
|
|
|
|
|
| |
Fixed set-but-not-used warnings.
Reviewer: gribozavr
llvm-svn: 173810
|
|
|
|
|
|
| |
for refactoring the ARC Optimizer.
llvm-svn: 173647
|
|
|
|
|
|
|
|
|
| |
This name change does the following:
1. Causes the function name to use proper ARC terminology.
2. Makes it clear what the function truly does.
llvm-svn: 173609
|
|
|
|
|
|
| |
in 'Provenance Analysis'.
llvm-svn: 173374
|
|
|
|
| |
llvm-svn: 173202
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
into the method ConnectTDBUTraversals.
The method PerformCodePlacement was doing too much (i.e. 3x loops, lots of
different checking). This refactoring separates the analysis section of the
method into a separate function while leaving the actual code placement and
analysis preparation in PerformCodePlacement.
*NOTE* Really this part of ObjCARC should be refactored out of the main pass
class into its own seperate class/struct. But, it is not time to make that
change yet though (don't want to make such an invasive change without fixing all
of the bugs first).
llvm-svn: 173201
|
|
|
|
|
|
|
| |
Use the AttributeSet when we're talking about more than one attribute. Add a
function that adds a single attribute. No functionality change intended.
llvm-svn: 173196
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
generic function calls and intrinsics. This is somewhat overlapping with
an existing intrinsic cost method, but that one seems targetted at
vector intrinsics. I'll merge them or separate their names and use cases
in a separate commit.
This sinks the test of 'callIsSmall' down into TTI where targets can
control it. The whole thing feels very hack-ish to me though. I've left
a FIXME comment about the fundamental design problem this presents. It
isn't yet clear to me what the users of this function *really* care
about. I'll have to do more analysis to figure that out. Putting this
here at least provides it access to proper analysis pass tools and other
such. It also allows us to more cleanly implement the baseline cost
interfaces in TTI.
With this commit, it is now theoretically possible to simplify much of
the inline cost analysis's handling of calls by calling through to this
interface. That conversion will have to happen in subsequent commits as
it requires more extensive restructuring of the inline cost analysis.
The CodeMetrics class is now really only in the business of running over
a block of code and aggregating the metrics on that block of code, with
the actual cost evaluation done entirely in terms of TTI.
llvm-svn: 173148
|
|
|
|
|
|
|
|
|
|
|
|
| |
is free. The whole CodeMetrics API should probably be reworked more, but
this is enough to allow deleting the duplicate code there for computing
whether an instruction is free.
All of the passes using this have been updated to pull in TTI and hand
it to the CodeMetrics stuff. Further, a dead CodeMetrics API
(analyzeFunction) is nuked for lack of users.
llvm-svn: 173036
|
|
|
|
| |
llvm-svn: 172864
|
|
|
|
| |
llvm-svn: 172863
|
|
|
|
|
|
|
| |
Further encapsulation of the Attribute object. Don't allow direct access to the
Attribute object as an aggregate.
llvm-svn: 172853
|
|
|
|
| |
llvm-svn: 172839
|
|
|
|
| |
llvm-svn: 172782
|
|
|
|
| |
llvm-svn: 172736
|
|
|
|
|
|
| |
``Visited'' Debug message to use it.
llvm-svn: 172735
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-fno-objc-arc-exception is enabled due to it's affect on correctness.
Specifically according to the semantics of ARC -fno-objc-arc-exception simply
states that it is expected that the unwind path out of a call *MAY* not release
objects. Thus we can have the situation where a release gets moved into a catch
block which we ignore when we remove a retain/release pair resulting in (even
though we assume the program is exiting anyways) the cleanup code path
potentially blowing up before program exit.
llvm-svn: 172599
|
|
|
|
| |
llvm-svn: 172452
|
|
|
|
| |
llvm-svn: 172374
|
|
|
|
|
|
| |
use doxygen). Still some work to do though.
llvm-svn: 172371
|
|
|
|
|
|
|
|
| |
2x blocks each assigned a value via a phi-node causing each to depend on the other.
A test case is provided as well.
llvm-svn: 172368
|
|
|
|
| |
llvm-svn: 172347
|
|
|
|
| |
llvm-svn: 172346
|
|
|
|
|
|
|
|
| |
case, but looking at the diff this was an obviously unintended change.
Thanks for the careful review Bill! =]
llvm-svn: 172336
|
|
|
|
| |
llvm-svn: 172299
|
|
|
|
| |
llvm-svn: 172298
|
|
|
|
|
|
| |
=> objc_autorelease but were not updating the InstructionClass to IC_Autorelease.
llvm-svn: 172288
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
not be placed into an autorelease pool.
The reason that this occurs is that tail calling objc_autorelease eventually
tail calls -[NSObject autorelease] which supports fast autorelease. This can
cause us to violate the semantic gaurantees of __autoreleasing variables that
assignment to an __autoreleasing variables always yields an object that is
placed into the innermost autorelease pool.
The fix included in this patch works by:
1. In the peephole optimization function OptimizeIndividualFunctions, always
remove tail call from objc_autorelease.
2. Whenever we convert to/from an objc_autorelease, set/unset the tail call
keyword as appropriate.
*NOTE* I also handled the case where objc_autorelease is converted in
OptimizeReturns to an autoreleaseRV which still violates the ARC semantics. I
will be removing that in a later patch and I wanted to make sure that the tree
is in a consistent state vis-a-vis ARC always.
Additionally some test cases are provided and all tests that have tail call marked
objc_autorelease keywords have been modified so that tail call has been removed.
*NOTE* One test fails due to a separate bug that I am going to commit soon. Thus
I marked the check line TMP: instead of CHECK: so make check does not fail.
llvm-svn: 172287
|
|
|
|
|
|
|
|
| |
The root cause is mistakenly taking for granted that
"dyn_cast<Instruction>(a-Value)"
return a non-NULL instruction.
llvm-svn: 172145
|
|
|
|
|
|
| |
into an autoreleaseRV.
llvm-svn: 172034
|
|
|
|
|
|
|
|
|
|
| |
commits ala echristo's suggestion.
1. Added debug messages when in OptimizeIndividualCalls we move calls into predecessors and then erase the original call.
2. Added debug messages when in the process of moving calls in ObjCARCOpt::MoveCalls we create new RR and delete old RR.
3. Added a debug message when we visit a specific retain instruction in ObjCARCOpt::PerformCodePlacement.
llvm-svn: 171988
|
|
|
|
|
|
| |
Fixes PR14854.
llvm-svn: 171984
|