| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
they'll be simple enough to simulate, and to reduce the chance we'll encounter
equal but different simple pointer constants.
This removes the symptoms from PR11352 but is not a full fix. A proper fix would
either require a guarantee that two constant objects we simulate are folded
when equal, or a different way of handling equal pointers (ie., trying a
constantexpr icmp on them to see whether we know they're equal or non-equal or
unsure).
llvm-svn: 151093
|
|
|
|
| |
llvm-svn: 151056
|
|
|
|
|
|
|
|
|
|
|
| |
of the indices.
This transformation is not safe in some pathological cases (signed icmp of pointers should be an
extremely rare thing, but it's valid IR!). Add an explanatory comment.
Kudos to Duncan for pointing out this edge case (and not giving up explaining it until I finally got it).
llvm-svn: 151055
|
|
|
|
| |
llvm-svn: 151003
|
|
|
|
| |
llvm-svn: 150998
|
|
|
|
|
|
| |
when the GEPs are inbounds.
llvm-svn: 150978
|
|
|
|
|
|
|
|
| |
pointer but use different types, expand the offset calculation and to the compare on the offset if profitable.
This came up in SmallVector code.
llvm-svn: 150962
|
|
|
|
|
|
|
|
|
| |
- Ignore pointer casts.
- Also expand GEPs that aren't constantexprs when they have one use or only constant indices.
- We now compile "&foo[i] - &foo[j]" into "i - j".
llvm-svn: 150961
|
|
|
|
| |
llvm-svn: 150947
|
|
|
|
|
|
| |
the information that they pass around between them. No functionality change!
llvm-svn: 150939
|
|
|
|
| |
llvm-svn: 150918
|
|
|
|
|
|
|
|
| |
metadata may still unwind, but only in ways that the ARC
optimizer doesn't need to consider. This permits more
aggressive optimization.
llvm-svn: 150829
|
|
|
|
|
|
|
|
|
| |
useful to represent a variable that is const in the source but can't be constant
in the IR because of a non-trivial constructor. If globalopt evaluates the
constructor, and there was an invariant.start with no matching invariant.end
possible, it will mark the global constant afterwards.
llvm-svn: 150794
|
|
|
|
| |
llvm-svn: 150780
|
|
|
|
| |
llvm-svn: 150779
|
|
|
|
|
|
| |
Patrik Hägglund, with slightly modified test. Issue reported by Patrik Hägglund on llvmdev.
llvm-svn: 150642
|
|
|
|
| |
llvm-svn: 150449
|
|
|
|
|
|
| |
This folds a simple loop tail into a loop latch. It covers the common (in fortran) case of postincrement loops. It's a "free" way to expose this type of loop to downstream loop optimizations that bail out on non-canonical loops (getLoopLatch is a heavily used check).
llvm-svn: 150439
|
|
|
|
| |
llvm-svn: 150438
|
|
|
|
| |
llvm-svn: 150425
|
|
|
|
|
|
|
| |
(but not of) a block pointer do not cause the block pointer to
escape. This fixes rdar://10803830.
llvm-svn: 150424
|
|
|
|
|
|
|
| |
Clang patch (flags) will follow shortly.
The run-time library will also follow, but not immediately.
llvm-svn: 150423
|
|
|
|
|
|
|
|
|
| |
- Use unsigned literals when the desired result is unsigned. This mostly allows unsigned/signed mismatch warnings to be less noisy even if they aren't on by default.
- Remove misplaced llvm_unreachable.
- Add static to a declaration of a function on MSVC x86 only.
- Change some instances of calling a static function through a variable to simply calling that function while removing the unused variable.
llvm-svn: 150364
|
|
|
|
|
|
| |
that no optz'ns have run yet to convert invokes to calls.
llvm-svn: 150326
|
|
|
|
| |
llvm-svn: 150324
|
|
|
|
|
|
| |
to TargetLibraryInfo and use one of them in GlobalOpt.
llvm-svn: 150323
|
|
|
|
|
|
| |
few fixme's when TLI was added.
llvm-svn: 150322
|
|
|
|
|
|
| |
doxy-style on local variables to not do so. Fix one 80-col violation.
llvm-svn: 150320
|
|
|
|
| |
llvm-svn: 150319
|
|
|
|
|
|
|
|
| |
This allows BBVectorize to check the "unknown instruction" list in the
alias sets. This is important to prevent instruction fusing from reordering
function calls. Resolves PR11920.
llvm-svn: 150250
|
|
|
|
| |
llvm-svn: 150183
|
|
|
|
|
|
|
|
|
| |
GlobalOpt runs early in the pipeline (before inlining) and complex class
hierarchies often introduce bitcasts or GEPs which weren't optimized away.
Teach it to ignore side-effect free instructions instead of depending on
other passes to remove them.
llvm-svn: 150174
|
|
|
|
|
|
| |
llvm part
llvm-svn: 150102
|
|
|
|
|
|
| |
and setting that.
llvm-svn: 150074
|
|
|
|
| |
llvm-svn: 149967
|
|
|
|
|
|
| |
instead of always using ConstantVector.
llvm-svn: 149912
|
|
|
|
|
|
|
| |
were no 'unwind' instructions being generated before this, so this is in effect
a no-op.
llvm-svn: 149906
|
|
|
|
|
|
| |
remove the code that handles them.
llvm-svn: 149901
|
|
|
|
| |
llvm-svn: 149865
|
|
|
|
|
|
| |
change.
llvm-svn: 149861
|
|
|
|
| |
llvm-svn: 149857
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Most of the transforms come through intact by having each transformed load or
store copy the ordering and synchronization scope of the original.
* The transform that turns a global only accessed in main() into an alloca
(since main is non-recursive) with a store of the initial value uses an
unordered store, since it's guaranteed to be the first thing to happen in main.
(Threads may have started before main (!) but they can't have the address of a
function local before the point in the entry block we insert our code.)
* The heap-SRoA transforms are disabled in the face of atomic operations. This
can probably be improved; it seems odd to have atomic accesses to an alloca
that doesn't have its address taken.
AnalyzeGlobal keeps track of the strongest ordering found in any use of the
global. This is more information than we need right now, but it's cheap to
compute and likely to be useful.
llvm-svn: 149847
|
|
|
|
| |
llvm-svn: 149845
|
|
|
|
|
|
| |
predecessor then it's Src.
llvm-svn: 149843
|
|
|
|
| |
llvm-svn: 149839
|
|
|
|
|
|
|
|
|
|
|
|
| |
logic by half: isOnlyReachableViaThisEdge was trying to be clever and
handle the case of a branch to a basic block which is contained in a
loop. This costs a domtree lookup and is completely useless due to
GVN's position in the pass pipeline: all loops have preheaders at this
point, which means it is enough for isOnlyReachableViaThisEdge to check
that Dst has only one predecessor. (I checked this theoretical argument
by running over the entire nightly testsuite, and indeed it is so!).
llvm-svn: 149838
|
|
|
|
|
|
|
| |
compiling sqlite3, by only doing dom queries after the cheap check
rather than interleaved with it.
llvm-svn: 149836
|
|
|
|
| |
llvm-svn: 149813
|
|
|
|
| |
llvm-svn: 149810
|
|
|
|
|
|
|
|
|
| |
but with a critical fix to the SelectionDAG code that optimizes copies
from strings into immediate stores: the previous code was stopping reading
string data at the first nul. Address this by adding a new argument to
llvm::getConstantStringInfo, preserving the behavior before the patch.
llvm-svn: 149800
|