| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
static_cast from Constant* to Value* has to adjust the "this" pointer.
This is groundwork for PR889.
llvm-svn: 123435
|
| |
|
|
|
|
|
|
|
|
|
|
| |
While there, I noticed that the transform "undef >>a X -> undef" was wrong.
For example if X is 2 then the top two bits must be equal, so the result can
not be anything. I fixed this in the constant folder as well. Also, I made
the transform for "X << undef" stronger: it now folds to undef always, even
though X might be zero. This is in accordance with the LangRef, but I must
admit that it is fairly aggressive. Also, I added "i32 X << 32 -> undef"
following the LangRef and the constant folder, likewise fairly aggressive.
llvm-svn: 123417
|
| |
|
|
| |
llvm-svn: 123358
|
| |
|
|
|
|
|
|
|
|
|
| |
"this" pointer for any subclass of User, you could static_cast it to
User* and then reinterpret_cast that to Use* to get the end of the
operand list. This isn't a safe assumption in general, because the
static_cast might adjust the "this" pointer. Fixed by having these
OperandTraits classes take an extra template parameter, which is the
subclass of User. This is groundwork for PR889.
llvm-svn: 123235
|
| |
|
|
| |
llvm-svn: 123078
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a unnamed_addr bit to global variables and functions. This will be used
to indicate that the address is not significant and therefore the constant
or function can be merged with others.
If an optimization pass can show that an address is not used, it can set this.
Examples of things that can have this set by the FE are globals created to
hold string literals and C++ constructors.
Adding unnamed_addr to a non-const global should have no effect unless
an optimization can transform that global into a constant.
Aliases are not allowed to have unnamed_addr since I couldn't figure
out any use for it.
llvm-svn: 123063
|
| |
|
|
|
|
| |
every BranchInst has a fixed number of operands.
llvm-svn: 123027
|
| |
|
|
| |
llvm-svn: 122911
|
| |
|
|
| |
llvm-svn: 122809
|
| |
|
|
|
|
| |
so that Dominators.h is *just* domtree. Also prune #includes a bit.
llvm-svn: 122714
|
| |
|
|
| |
llvm-svn: 122613
|
| |
|
|
| |
llvm-svn: 122571
|
| |
|
|
|
|
|
| |
new gcc warning that complains on self-assignments and
self-initializations.
llvm-svn: 122458
|
| |
|
|
|
|
|
| |
something that just glues two nodes together, even if it is
sometimes used for flags.
llvm-svn: 122310
|
| |
|
|
|
|
| |
severe slowdowns on the Linux self-host configuration.
llvm-svn: 122279
|
| |
|
|
| |
llvm-svn: 122242
|
| |
|
|
| |
llvm-svn: 122193
|
| |
|
|
|
|
|
| |
headers provide symbols outside namespace std and the LLVM coding standards
state that we should prefix all of them.
llvm-svn: 122192
|
| |
|
|
|
|
| |
changes.
llvm-svn: 122114
|
| |
|
|
| |
llvm-svn: 122099
|
| |
|
|
|
|
| |
via an out parm.
llvm-svn: 121958
|
| |
|
|
|
|
|
| |
function so that it can live in Analysis instead of
VMCore.
llvm-svn: 121885
|
| |
|
|
|
|
| |
error_code &ec. And fix clients.
llvm-svn: 121379
|
| |
|
|
|
|
|
|
|
| |
uses of the function's blocks with undef. This code isn't needed,
because BasicBlock's destructor handles such uses. Also, undef isn't
correct, since blockaddresses may still be used for comparisons
with null.
llvm-svn: 121170
|
| |
|
|
|
|
|
|
| |
zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method
trunc(), to be const and to return a new value instead of modifying the
object in place.
llvm-svn: 121120
|
| |
|
|
|
|
|
|
| |
out-of-bounds indexing.
Also add asserts that the indices are valid in InsertValueInst::init(). ExtractValueInst already asserts when constructed with invalid indices.
llvm-svn: 120956
|
| |
|
|
| |
llvm-svn: 120910
|
| |
|
|
| |
llvm-svn: 120909
|
| |
|
|
| |
llvm-svn: 120907
|
| |
|
|
| |
llvm-svn: 120298
|
| |
|
|
|
|
| |
by Eric Dobson!
llvm-svn: 120259
|
| |
|
|
|
|
| |
patch by Greg Pfeil!
llvm-svn: 119989
|
| |
|
|
| |
llvm-svn: 119908
|
| |
|
|
|
|
|
|
| |
deallocated before the global
LLVMContext, causing memory errors. Patch by Peter Collingbourne.
llvm-svn: 119721
|
| |
|
|
|
|
|
| |
phi node itself if it occurs in an unreachable basic block. Protect
against this. Hopefully this will fix some more buildbots.
llvm-svn: 119493
|
| |
|
|
|
|
|
|
| |
cookie argument to the SourceMgr diagnostic stuff. This cleanly separates
LLVMContext's inlineasm handler from the sourcemgr error handling
definition, increasing type safety and cleaning things up.
llvm-svn: 119486
|
| |
|
|
| |
llvm-svn: 119463
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
class, uses DominatorTree which is an analysis. This change moves all of
the tricky hasConstantValue logic to SimplifyInstruction, and replaces it
with a very simple literal implementation. I already taught users of
hasConstantValue that need tricky stuff to use SimplifyInstruction instead.
I didn't update InlineFunction because the IR looks like it might be in a
funky state at the point it calls hasConstantValue, which makes calling
SimplifyInstruction dangerous since it can in theory do a lot of tricky
reasoning. This may be a pessimization, for example in the case where
all phi node operands are either undef or a fixed constant.
llvm-svn: 119459
|
| |
|
|
|
|
| |
it to get better phi node simplification.
llvm-svn: 119055
|
| |
|
|
| |
llvm-svn: 118846
|
| |
|
|
|
|
|
|
|
|
|
|
| |
testing for dereferenceable pointers into a helper function,
isDereferenceablePointer. Teach it how to reason about GEPs
with simple non-zero indices.
Also eliminate ArgumentPromtion's IsAlwaysValidPointer,
which didn't check for weak externals or out of range gep
indices.
llvm-svn: 118840
|
| |
|
|
| |
llvm-svn: 118790
|
| |
|
|
| |
llvm-svn: 118589
|
| |
|
|
|
|
| |
pointing out how I was being stupid.
llvm-svn: 118588
|
| |
|
|
| |
llvm-svn: 118490
|
| |
|
|
|
|
|
|
| |
reference counting was itself threadsafe,
the implicit removal of each object from the global list was not. Make this operation atomic.
llvm-svn: 118461
|
| |
|
|
|
|
|
|
| |
PR 8522 / 8616046. Test reduction, analysis and patch by Tim Deegan!
(However, review by someone who understands the classes here better
is welcome. John Krum will return!)
llvm-svn: 118030
|
| |
|
|
|
|
| |
basic logic, added initial platform support.
llvm-svn: 117667
|
| |
|
|
|
|
|
| |
instruction at the beginning of each function that has the attribute, allowing
the function to be easily hooked and/or patched.
llvm-svn: 117264
|
| |
|
|
| |
llvm-svn: 117111
|