History log of /external/llvm/lib/VMCore/Instructions.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0fd518beb38568e58eeec86876bb597bab06b722 03-Jul-2012 Nuno Lopes <nunoplopes@sapo.pt> PHINode::hasConstantValue(): return undef if the PHI is fully recursive.
Thanks Duncan for the idea

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159687 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
44d5c064888aedd70a8f994bd379372d532ab46f 03-Jul-2012 Nuno Lopes <nunoplopes@sapo.pt> improve PHINode::hasConstantValue() to detect recursive cases like %phi = phi(%phi,42) as constant

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
43c3a4a7e76920c5646e473b72620acc7eb4ca5a 22-Jun-2012 Stepan Dyatkovskiy <stpworld@narod.ru> Fixed r158979.
Original message:
Performance optimizations:
- SwitchInst: case values stored separately from Operands List. It allows to make faster access to individual case value numbers or ranges.
- Optimized IntItem, added APInt value caching.
- Optimized IntegersSubsetGeneric: added optimizations for cases when subset is single number or when subset consists from single numbers only.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158997 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
37eeb058a30200101836d82098542d3d2fc4f3d5 22-Jun-2012 Duncan Sands <baldrick@free.fr> Revert commit 158979 (dyatkovskiy) since it is causing several buildbots to
fail. Original commit message:

Performance optimizations:
- SwitchInst: case values stored separately from Operands List. It allows to make faster access to individual case value numbers or ranges.
- Optimized IntItem, added APInt value caching.
- Optimized IntegersSubsetGeneric: added optimizations for cases when subset is single number or when subset consists from single numbers only.

On my machine these optimizations gave about 4-6% of compile-time improvement.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158986 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
7351256208c9ff2cb7b5bdcf4427229abe2a50a8 22-Jun-2012 Stepan Dyatkovskiy <stpworld@narod.ru> Performance optimizations:
- SwitchInst: case values stored separately from Operands List. It allows to make faster access to individual case value numbers or ranges.
- Optimized IntItem, added APInt value caching.
- Optimized IntegersSubsetGeneric: added optimizations for cases when subset is single number or when subset consists from single numbers only.

On my machine these optimizations gave about 4-6% of compile-time improvement.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158979 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
0aa32d5d0ff6cd65b6cff957858a79e2d2a614bd 29-May-2012 Stepan Dyatkovskiy <stpworld@narod.ru> ConstantRangesSet renamed to IntegersSubset. CRSBuilder renamed to IntegersSubsetMapping.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157612 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
484fc93eff0295b1aa52b9a64d22346580e4b0e2 28-May-2012 Stepan Dyatkovskiy <stpworld@narod.ru> PR1255: Case Ranges
Implemented IntItem - the wrapper around APInt. Why not to use APInt item directly right now?
1. It will very difficult to implement case ranges as series of small patches. We got several large and heavy patches. Each patch will about 90-120 kb. If you replace ConstantInt with APInt in SwitchInst you will need to changes at the same time all Readers,Writers and absolutely all passes that uses SwitchInst.
2. We can implement APInt pool inside and save memory space. E.g. we use several switches that works with 256 bit items (switch on signatures, or strings). We can avoid value duplicates in this case.
3. IntItem can be easyly easily replaced with APInt.
4. Currenly we can interpret IntItem both as ConstantInt and as APInt. It allows to provide SwitchInst methods that works with ConstantInt for non-updated passes.

Why I need it right now? Currently I need to update SimplifyCFG pass (EqualityComparisons). I need to work with APInts directly a lot, so peaces of code
ConstantInt *V = ...;
if (V->getValue().ugt(AnotherV->getValue()) {
...
}
will look awful. Much more better this way:
IntItem V = ConstantIntVal->getValue();
if (AnotherV < V) {
}

Of course any reviews are welcome.

P.S.: I'm also going to rename ConstantRangesSet to IntegersSubset, and CRSBuilder to IntegersSubsetMapping (allows to map individual subsets of integers to the BasicBlocks).
Since in future these classes will founded on APInt, it will possible to use them in more generic ways.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157576 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
1cce5bf8ef9ee3dc157ae5d8778f84a7a0d1d8b9 12-May-2012 Stepan Dyatkovskiy <stpworld@narod.ru> Recommited r156374 with critical fixes in BitcodeReader/Writer:
Ordinary patch for PR1255.
Added new case-ranges orientated methods for adding/removing cases in SwitchInst. After this patch cases will internally representated as ConstantArray-s instead of ConstantInt, externally cases wrapped within the ConstantRangesSet object.
Old methods of SwitchInst are also works well, but marked as deprecated. So on this stage we have no side effects except that I added support for case ranges in BitcodeReader/Writer, of course test for Bitcode is also added. Old "switch" format is also supported.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156704 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
1f9838347fdcc75cead228ec1758063074b89c6a 08-May-2012 Stepan Dyatkovskiy <stpworld@narod.ru> Rejected r156374: Ordinary PR1255 patch. Due to clang-x86_64-debian-fnt buildbot failure.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156377 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
85a4406959fe7794062d62d2f17226235630eee1 08-May-2012 Stepan Dyatkovskiy <stpworld@narod.ru> Ordinary patch for PR1255.
Added new case-ranges orientated methods for adding/removing cases in SwitchInst. After this patch cases will internally representated as ConstantArray-s instead of ConstantInt, externally cases wrapped within the ConstantRangesSet object.
Old methods of SwitchInst are also works well, but marked as deprecated. So on this stage we have no side effects except that I added support for case ranges in BitcodeReader/Writer, of course test for Bitcode is also added. Old "switch" format is also supported.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156374 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
2867c85a3754320f96e36afb63325bb76269caa4 16-Apr-2012 Duncan Sands <baldrick@free.fr> Remove support for the special 'fast' value for fpmath accuracy for the moment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154850 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
8883c43ddc13e5f92ba8dfe00f2116a153a570d5 16-Apr-2012 Duncan Sands <baldrick@free.fr> Make it possible to indicate relaxed floating point requirements at the IR level
through the use of 'fpmath' metadata. Currently this only provides a 'fpaccuracy'
value, which may be a number in ULPs or the keyword 'fast', however the intent is
that this will be extended with additional information about NaN's, infinities
etc later. No optimizations have been hooked up to this so far.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154822 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
c10fa6c801e48771b5eade50afc2fe6abaf08227 08-Mar-2012 Stepan Dyatkovskiy <stpworld@narod.ru> Taken into account Duncan's comments for r149481 dated by 2nd Feb 2012:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120130/136146.html

Implemented CaseIterator and it solves almost all described issues: we don't need to mix operand/case/successor indexing anymore. Base iterator class is implemented as a template since it may be initialized either from "const SwitchInst*" or from "SwitchInst*".

ConstCaseIt is just a read-only iterator.
CaseIt is read-write iterator; it allows to change case successor and case value.

Usage of iterator allows totally remove resolveXXXX methods. All indexing convertions done automatically inside the iterator's getters.

Main way of iterator usage looks like this:
SwitchInst *SI = ... // intialize it somehow

for (SwitchInst::CaseIt i = SI->caseBegin(), e = SI->caseEnd(); i != e; ++i) {
BasicBlock *BB = i.getCaseSuccessor();
ConstantInt *V = i.getCaseValue();
// Do something.
}

If you want to convert case number to TerminatorInst successor index, just use getSuccessorIndex iterator's method.
If you want initialize iterator from TerminatorInst successor index, use CaseIt::fromSuccessorIndex(...) method.

There are also related changes in llvm-clients: klee and clang.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152297 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
b0934ab7d811e23bf530371976b8b35f3242169c 19-Feb-2012 Ahmed Charles <ace2001ac@gmail.com> Remove dead code. Improve llvm_unreachable text. Simplify some control flow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150918 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
8833ef03b9ceaa52063116819fff8b3d16fd8933 06-Feb-2012 Bill Wendling <isanbard@gmail.com> [unwind removal] Remove all of the code for the dead 'unwind' instruction. There
were no 'unwind' instructions being generated before this, so this is in effect
a no-op.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149906 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
50bee42b54cd9aec5f49566307df2b0cf23afcf6 05-Feb-2012 Craig Topper <craig.topper@gmail.com> Convert assert(0) to llvm_unreachable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149849 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
24473120a253a05f3601cd3373403b47e6d03d41 01-Feb-2012 Stepan Dyatkovskiy <stpworld@narod.ru> SwitchInst refactoring.
The purpose of refactoring is to hide operand roles from SwitchInst user (programmer). If you want to play with operands directly, probably you will need lower level methods than SwitchInst ones (TerminatorInst or may be User). After this patch we can reorganize SwitchInst operands and successors as we want.

What was done:

1. Changed semantics of index inside the getCaseValue method:
getCaseValue(0) means "get first case", not a condition. Use getCondition() if you want to resolve the condition. I propose don't mix SwitchInst case indexing with low level indexing (TI successors indexing, User's operands indexing), since it may be dangerous.
2. By the same reason findCaseValue(ConstantInt*) returns actual number of case value. 0 means first case, not default. If there is no case with given value, ErrorIndex will returned.
3. Added getCaseSuccessor method. I propose to avoid usage of TerminatorInst::getSuccessor if you want to resolve case successor BB. Use getCaseSuccessor instead, since internal SwitchInst organization of operands/successors is hidden and may be changed in any moment.
4. Added resolveSuccessorIndex and resolveCaseIndex. The main purpose of these methods is to see how case successors are really mapped in TerminatorInst.
4.1 "resolveSuccessorIndex" was created if you need to level down from SwitchInst to TerminatorInst. It returns TerminatorInst's successor index for given case successor.
4.2 "resolveCaseIndex" converts low level successors index to case index that curresponds to the given successor.

Note: There are also related compatability fix patches for dragonegg, klee, llvm-gcc-4.0, llvm-gcc-4.2, safecode, clang.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149481 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
a78fa8cc2dd6d2ffe5e4fe605f38aae7b3d2fb7a 27-Jan-2012 Chris Lattner <sabre@nondot.org> continue making the world safe for ConstantDataVector. At this point,
we should (theoretically optimize and codegen ConstantDataVector as well
as ConstantVector.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149116 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
56243b89e7d5072d2d5498f806679d19ea483dac 26-Jan-2012 Chris Lattner <sabre@nondot.org> eliminate the Constant::getVectorElements method. There are better (and
more robust) ways to do what it was doing now. Also, add static methods
for decoding a ShuffleVector mask.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149028 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
220dfa7e0c7cdb3e6b3fc8f859005939c11e4e90 26-Jan-2012 Chris Lattner <sabre@nondot.org> fix pasto in the new (and still unused) ShuffleVectorInst::getShuffleMask method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149005 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
83694a984c153a0d78dcfb47d464c9a1561c22ef 26-Jan-2012 Chris Lattner <sabre@nondot.org> add some helper methods to ShuffleVectorInst and enhance its
"isValidOperands" and "getMaskValue" methods to allow
ConstantDataSequential.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148998 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
4ca829e89567f002fc74eb0e3e532a7c7662e031 25-Jan-2012 Chris Lattner <sabre@nondot.org> use ConstantVector::getSplat in a few places.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148929 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
af7b4fb9bec3858f0374d713dcbf3398a23c6fbe 25-Jan-2012 Chris Lattner <sabre@nondot.org> Remove the Type::getNumElements() method, which is only called in 4 places,
did something extremely surprising, and shadowed actually useful
implementations that had completely different behavior.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148898 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
4d6ccb5f68cd7c6418a209f1fa4dbade569e4493 20-Jan-2012 David Blaikie <dblaikie@gmail.com> More dead code removal (using -Wunreachable-code)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148578 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
1608769abeb1430dc34f31ffac0d9850f99ae36a 05-Dec-2011 Nadav Rotem <nadav.rotem@intel.com> Add support for vectors of pointers.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
0becc96b243da058f6d8901128b173d192db5148 01-Dec-2011 David Blaikie <dblaikie@gmail.com> Add some missing anchors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145578 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
cf62b371a970d109fa373e2fc2f5a024cdadcf42 26-Oct-2011 Mon P Wang <wangmp@apple.com> The bitcode reader can create an shuffle with a place holder mask which it will
fix up later. For this special case, allow such a mask to be considered valid.
<rdar://problem/8622574>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142992 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
602650c98822371d4a34b00353ec71051621b7fb 17-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Add a routine to swap branch instruction operands, and update any
profile metadata at the same time. Use it to preserve metadata attached
to a branch when re-writing it in InstCombine.

Add metadata to the canonicalize_branch InstCombine test, and check that
it is tranformed correctly.

Reviewed by Nick Lewycky!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142168 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
23946fcaaefaf3c1a9d1ef86a3786f622c005f1a 21-Sep-2011 Richard Trieu <rtrieu@google.com> Change:

assert(!"error message");

To:

assert(0 && "error message");

which is more consistant across the code base.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140234 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
89879ec76b5d81b0cc82e9f402dfe7c4cc63b0d6 29-Aug-2011 Nadav Rotem <nadav.rotem@intel.com> Fixes following the CR by Chris and Duncan:

Optimize chained bitcasts of the form A->B->A.
Undo r138722 and change isEliminableCastPair to allow this case.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138756 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
e6e8826870bee3facb04f950f0bd725f8a88623d 12-Aug-2011 Bill Wendling <isanbard@gmail.com> Initial commit of the 'landingpad' instruction.

This implements the 'landingpad' instruction. It's used to indicate that a basic
block is a landing pad. There are several restrictions on its use (see
LangRef.html for more detail). These restrictions allow the exception handling
code to gather the information it needs in a much more sane way.

This patch has the definition, implementation, C interface, parsing, and bitcode
support in it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
1cc5e3883076593d027a4b0eebfc91c07b6cbc40 10-Aug-2011 Eli Friedman <eli.friedman@gmail.com> Whitespace.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137226 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
21006d40ac9ec7715bca2095451075a83773dc52 10-Aug-2011 Eli Friedman <eli.friedman@gmail.com> Representation of 'atomic load' and 'atomic store' in IR.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137170 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
dccc03b2423fe65efb5963ae816b99c24fc53374 31-Jul-2011 Bill Wendling <isanbard@gmail.com> Add the 'resume' instruction for the new EH rewrite.

This adds the 'resume' instruction class, IR parsing, and bitcode reading and
writing. The 'resume' instruction resumes propagation of an existing (in-flight)
exception whose unwinding was interrupted with a 'landingpad' instruction (to be
added later).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136589 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
10c6d12a9fd4dab411091f64db4db69670b88850 30-Jul-2011 Bill Wendling <isanbard@gmail.com> Revert r136253, r136263, r136269, r136313, r136325, r136326, r136329, r136338,
r136339, r136341, r136369, r136387, r136392, r136396, r136429, r136430, r136444,
r136445, r136446, r136253 pending review.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136556 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
ff03048c1350fcc4fda1ef6d6c57252f3a950854 28-Jul-2011 Eli Friedman <eli.friedman@gmail.com> LangRef and basic memory-representation/reading/writing for 'cmpxchg' and
'atomicrmw' instructions, which allow representing all the current atomic
rmw intrinsics.

The allowed operands for these instructions are heavily restricted at the
moment; we can probably loosen it a bit, but supporting general
first-class types (where it makes sense) might get a bit complicated,
given how SelectionDAG works.

As an initial cut, these operations do not support specifying an alignment,
but it would be possible to add if we think it's useful. Specifying an
alignment lower than the natural alignment would be essentially
impossible to support on anything other than x86, but specifying a greater
alignment would be possible. I can't think of any useful optimizations which
would use that information, but maybe someone else has ideas.

Optimizer/codegen support coming soon.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136404 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
7379b6650008fba555d5472d5c76e8efc59e8a21 28-Jul-2011 Bill Wendling <isanbard@gmail.com> The personality function should be a Function* and not just a Value*.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136392 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
71961846109c65f77a972a8c586cade62c35f081 28-Jul-2011 Bill Wendling <isanbard@gmail.com> Don't add in the asked for size so that we don't copy too much from the old to new vectors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136338 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
28d735230f0b3ac964f07e91594fb6c38772f0e6 28-Jul-2011 Bill Wendling <isanbard@gmail.com> Make sure that the landingpad instruction takes a Constant* as the clause's value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136326 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
7f66c45f35bdfc69c41f2e1b3b9891a4eca0c0b0 28-Jul-2011 Bill Wendling <isanbard@gmail.com> Add a couple of convenience functions:

* InvokeInst: Get the landingpad instruction associated with this invoke.
* LandingPadInst: A method to reserve extra space for clauses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136325 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
772fe17a6d07304ae2e6b3052bbb24ebb751f0f3 27-Jul-2011 Bill Wendling <isanbard@gmail.com> Merge the contents from exception-handling-rewrite to the mainline.

This adds the new instructions 'landingpad' and 'resume'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136253 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
47f3513dd574535aeb40c9eb11134f0899e92269 26-Jul-2011 Eli Friedman <eli.friedman@gmail.com> Initial implementation of 'fence' instruction, the new C++0x-style replacement for llvm.memory.barrier.

This is just a LangRef entry and reading/writing/memory representation; optimizer+codegen support coming soon.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136009 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
a9203109f4ac95aa7e9624f2838e3d89623ec902 25-Jul-2011 Jay Foad <jay.foad@gmail.com> Convert GetElementPtrInst to use ArrayRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
db125cfaf57cc83e7dd7453de2d509bc8efd0e5e 18-Jul-2011 Chris Lattner <sabre@nondot.org> land David Blaikie's patch to de-constify Type, with a few tweaks.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
a3efbb15ddd5aa9006564cd79086723640084878 15-Jul-2011 Jay Foad <jay.foad@gmail.com> Convert CallInst and InvokeInst APIs to use ArrayRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135265 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
fc6d3a49867cd38954dc40936a88f1907252c6d2 13-Jul-2011 Jay Foad <jay.foad@gmail.com> Convert InsertValueInst and ExtractValueInst APIs to use ArrayRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
1afcace3a3a138b1b18e5c6270caa8dae2261ae2 09-Jul-2011 Chris Lattner <sabre@nondot.org> Land the long talked about "type system rewrite" patch. This
patch brings numerous advantages to LLVM. One way to look at it
is through diffstat:
109 files changed, 3005 insertions(+), 5906 deletions(-)

Removing almost 3K lines of code is a good thing. Other advantages
include:

1. Value::getType() is a simple load that can be CSE'd, not a mutating
union-find operation.
2. Types a uniqued and never move once created, defining away PATypeHolder.
3. Structs can be "named" now, and their name is part of the identity that
uniques them. This means that the compiler doesn't merge them structurally
which makes the IR much less confusing.
4. Now that there is no way to get a cycle in a type graph without a named
struct type, "upreferences" go away.
5. Type refinement is completely gone, which should make LTO much MUCH faster
in some common cases with C++ code.
6. Types are now generally immutable, so we can use "Type *" instead
"const Type *" everywhere.

Downsides of this patch are that it removes some functions from the C API,
so people using those will have to upgrade to (not yet added) new API.
"LLVM 3.0" is the right time to do this.

There are still some cleanups pending after this, this patch is large enough
as-is.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134829 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
95c3e48f9557adb6064d580684bb14cacec2f826 23-Jun-2011 Jay Foad <jay.foad@gmail.com> Reinstate r133513 (reverted in r133700) with an additional fix for a
-Wshorten-64-to-32 warning in Instructions.h.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133708 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
e59fbc04ad343435705c28b3cf7038d65fe4af0a 23-Jun-2011 Eric Christopher <echristo@apple.com> Revert r133513:

"Reinstate r133435 and r133449 (reverted in r133499) now that the clang
self-hosted build failure has been fixed (r133512)."

Due to some additional warnings.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133700 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
cd35e09a4a3c640b9da0b1dfe3548a605c929ae5 21-Jun-2011 Jay Foad <jay.foad@gmail.com> Reinstate r133435 and r133449 (reverted in r133499) now that the clang
self-hosted build failure has been fixed (r133512).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133513 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
a88a0ca8082006b37d14d8aee4a644b20bae8bc9 21-Jun-2011 Chad Rosier <mcrosier@apple.com> Revert r133435 and r133449 to appease buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133499 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
332d7e871cbff385e6bf7d42565eb7d92cde0ed6 20-Jun-2011 Jay Foad <jay.foad@gmail.com> Fix a check for PHINodes with two incoming values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133449 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
72f5f313d87558958696ce69593d82efcdfa9128 20-Jun-2011 Jay Foad <jay.foad@gmail.com> Change how PHINodes store their operands.

Change PHINodes to store simple pointers to their incoming basic blocks,
instead of full-blown Uses.

Note that this loses an optimization in SplitCriticalEdge(), because we
can no longer walk the use list of a BasicBlock to find phi nodes. See
the comment I removed starting "However, the foreach loop is slow for
blocks with lots of predecessors".

Extend replaceAllUsesWith() on a BasicBlock to also update any phi
nodes in the block's successors. This mimics what would have happened
when PHINodes were proper Users of their incoming blocks. (Note that
this only works if OldBB->replaceAllUsesWith(NewBB) is called when
OldBB still has a terminator instruction, so it still has some
successors.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133435 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
7016ec1a458bd39decbe4573cc3d53eb4b736c75 18-May-2011 Duncan Sands <baldrick@free.fr> Now that SrcBits and DestBits always represent the primitive size, rather
than either the primitive size or the element primitive size (in the case
of vectors), simplify the vector logic. No functionality change. There
is some distracting churn in the patch because I lined up comments better
while there - sorry about that.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131533 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
bb1695e3332a8a47200397158a55d10d2f52946b 18-May-2011 Duncan Sands <baldrick@free.fr> Tighten up checking of the validity of casts. (1) The IR parser would
happily accept things like "sext <2 x i32> to <999 x i64>". It would
also accept "sext <2 x i32> to i64", though the verifier would catch
that later. Fixed by having castIsValid check that vector lengths match
except when doing a bitcast. (2) When creating a cast instruction, check
that the cast is valid (this was already done when creating constexpr
casts). While there, replace getScalarSizeInBits (used to allow more
vector casts) with getPrimitiveSizeInBits in getCastOpcode and isCastable
since vector to vector casts are now handled explicitly by passing to the
element types; i.e. this bit should result in no functional change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
117feba971a020653fef3d6d61a16345355b83fd 18-May-2011 Duncan Sands <baldrick@free.fr> Teach getCastOpcode about element-by-element vector casts. For example, "trunc"
can be used to turn a <4 x i64> into a <4 x i32> but getCastOpcode would assert
if you passed these types to it. Note that this strictly extends the previous
functionality: if getCastOpcode previously accepted two vector types (i.e. didn't
assert) then it still will and returns the same opcode (BitCast). That's because
before it would only accept vectors with the same bitwidth, and the new code only
touches vectors with the same length. However if two vectors have both the same
bitwidth and the same length then their element types have the same bitwidth, so
the new logic will return BitCast as before.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131530 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
4e9b0e3587dd6e72589e13b3d0ebadb06cf72fb2 11-Apr-2011 Jay Foad <jay.foad@gmail.com> Phi nodes always use an even number of operands, so don't ever allocate
an odd number.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129270 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
8891ed7ac95bfe7c7ee312dc168daf64dcb897b6 01-Apr-2011 Jay Foad <jay.foad@gmail.com> Various Instructions' resizeOperands() methods are only used to grow the
list of operands. Simplify and rename them accordingly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128708 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
607946533d4eb781713b363605c4a241503dbe0e 01-Apr-2011 Duncan Sands <baldrick@free.fr> While testing dragonegg I noticed that isCastable and getCastOpcode
had gotten out of sync: isCastable didn't think it was possible to
cast the x86_mmx type to anything, while it did think it possible
to cast an i64 to x86_mmx.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
35bda8914c0d1c02a6f90f42e7810c83150737e1 06-Feb-2011 Chris Lattner <sabre@nondot.org> enhance vmcore to know that udiv's can be exact, and add a trivial
instcombine xform to exercise this.

Nothing forms exact udivs yet though. This is progress on PR8862



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124992 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
0faa60938a66a09820ca21d55e7b5926bc58d59d 01-Feb-2011 Jay Foad <jay.foad@gmail.com> Make SwitchInst::removeCase() more efficient.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124659 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
1ed26acc58a13f125bc9e1d5e5aa22fd479654ff 16-Jan-2011 Jay Foad <jay.foad@gmail.com> Simplify the construction and destruction of Uses. Simplify
User::dropHungOffUses().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123580 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
25052d8d64f18a85d6a84e0e010f6ba3eba0760d 14-Jan-2011 Jay Foad <jay.foad@gmail.com> Remove casts between Value** and Constant**, which won't work if a
static_cast from Constant* to Value* has to adjust the "this" pointer.
This is groundwork for PR889.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123435 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
8e3914d12e939d7c686bd121b0e2b2d39ed126d2 07-Jan-2011 Jay Foad <jay.foad@gmail.com> Simplify the allocation and freeing of Users' operand lists, now that
every BranchInst has a fixed number of operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
c449a224bb5f7ae223106532be60294376f06630 04-Jan-2011 Duncan Sands <baldrick@free.fr> These methods should be "const"; make them so.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122809 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
8e68c3873549ca31533e2e3e40dda3a43cb79566 23-Dec-2010 Jeffrey Yasskin <jyasskin@google.com> Change all self assignments X=X to (void)X, so that we can turn on a
new gcc warning that complains on self-assignments and
self-initializations.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122458 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
a4805cf6efbcd405916cdd0eb4b6170231e906c7 05-Dec-2010 Frits van Bommel <fvbommel@gmail.com> Fix PR 4170 by having ExtractValueInst::getIndexedType() reject out-of-bounds indexing.

Also add asserts that the indices are valid in InsertValueInst::init(). ExtractValueInst already asserts when constructed with invalid indices.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120956 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
aa6e350c88b10d3cece4296be45ed6b458dcf05a 17-Nov-2010 Chris Lattner <sabre@nondot.org> fix PR8613 - Copy constructor of SwitchInst does not call SwitchInst::init


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
ff10341183adf74760e6118a55cbd1debf50f90f 17-Nov-2010 Duncan Sands <baldrick@free.fr> Fix a layering violation: hasConstantValue, which is part of the PHINode
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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119459 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
eff0581583ef10e2872e9baf537a04b67d992101 14-Nov-2010 Duncan Sands <baldrick@free.fr> If dom tree information is available, make it possible to pass
it to get better phi node simplification.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119055 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
11bfe3e5bf5a7c37a9f665ba5e825e00a8837f2c 03-Oct-2010 Bill Wendling <isanbard@gmail.com> Cleanup. Get rid of extraneous variable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115453 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
bac4c52131b79bf3c37075baf95edb93338b30c0 01-Oct-2010 Dale Johannesen <dalej@apple.com> Attempt to outwit overly smart compiler.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115251 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
0488fb649a56b7fc89a5814df5308813f9e5a85d 01-Oct-2010 Dale Johannesen <dalej@apple.com> Massive rewrite of MMX:
The x86_mmx type is used for MMX intrinsics, parameters and
return values where these use MMX registers, and is also
supported in load, store, and bitcast.

Only the above operations generate MMX instructions, and optimizations
do not operate on or produce MMX intrinsics.

MMX-sized vectors <2 x i32> etc. are lowered to XMM or split into
smaller pieces. Optimizations may occur on these forms and the
result casted back to x86_mmx, provided the result feeds into a
previous existing x86_mmx operation.

The point of all this is prevent optimizations from introducing
MMX operations, which is unsafe due to the EMMS problem.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115243 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
e0214d5b197aad569343665f5cf6b244747fe71c 27-Sep-2010 Dan Gohman <gohman@apple.com> Make this code 65-bit clean.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114828 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
a966af2f4cf77c4b8107fb0e93bb97a78f99f5dc 13-Aug-2010 Nate Begeman <natebegeman@mac.com> Move some code from Verifier into SVI::isValidOperands. This allows us to catch bad shufflevector operations when they are created, rather than waiting for someone to notice later on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110986 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
3ecf355c7a6f6f559f3c85b46d041ffda5163a8c 05-Aug-2010 Gabor Greif <ggreif@gmail.com> remove the private hack from CallInst, it was not supposed to hit the branch anyway

as a positive consequence the CallSite::getCallee() methods now can be rewritten to be
a bit more efficient

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110380 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
138aa2a82bc6de611f28e51332fb0a30262a58e3 28-Jul-2010 Dan Gohman <gohman@apple.com> Define a maximum supported alignment value for load, store, and
alloca instructions (constrained by their internal encoding),
and add error checking for it. Fix an instcombine bug which
generated huge alignment values (null is infinitely aligned).
This fixes undefined behavior noticed by John Regehr.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109643 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
a6aac4c5bc22bb10c7adb11eee3f82c703af7002 16-Jul-2010 Gabor Greif <ggreif@gmail.com> eliminate CallInst::ArgOffset

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108522 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
3472766f9eb7d66f234c390ce1b3a8b76f0ee9ce 12-Jul-2010 Duncan Sands <baldrick@free.fr> Convert some tab stops into spaces.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108130 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
dfd3626b477a416040fc4c08d5db3bb85d3500d8 12-Jul-2010 Chris Lattner <sabre@nondot.org> fix PR7311 by avoiding breaking casts when a bitcast from scalar->vector
is involved.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108117 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
5a30a8574cbcd3b385b1e8681c6a5c45856efb38 12-Jul-2010 Chris Lattner <sabre@nondot.org> make the prototypes for CreateMalloc and CreateFree more consistent. Patch
by Hans Vandierendonck from PR7605


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108116 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
fa680ea1ebfee911ba1a8f97f1cd5e813e143c2e 01-Jul-2010 Gabor Greif <ggreif@gmail.com> reformulate CallSite::getCallee to adapt to CallInst::ArgOffset, and make it work even if CallInst::op_* are private

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107390 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
eff566d19ab5d40e5c4a6f4ce44d3a0b218b4bec 29-Jun-2010 Gabor Greif <ggreif@gmail.com> encode operand initializations (at fixed index)
in terms of Op<> and ArgOffset. This works for
values of {0, 1} for ArgOffset.
Please note that ArgOffset will become 0 soon and
will go away eventually.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107129 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
403a8cdda5e76ea689693de16474650b4b0df818 21-Jun-2010 Dan Gohman <gohman@apple.com> Use A.append(...) instead of A.insert(A.end(), ...) when A is a
SmallVector, and other SmallVector simplifications.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
2c048ea5385ea994ad6e1622f3ced62cf034f35a 28-May-2010 Dan Gohman <gohman@apple.com> Split the logic behind CastInst::isNoopCast into a separate static function,
as is done with most other cast opcode predicates.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105008 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
f75a7d3fbf7fbb3071f45e248d3fb93312ec4fbd 28-May-2010 Dan Gohman <gohman@apple.com> Eliminate the restriction that the array size in an alloca must be i32.
This will help reduce the amount of casting required on 64-bit targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104911 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
1eaac532615a54a1133367dc2c4ceaa79a150a9d 04-May-2010 Dan Gohman <gohman@apple.com> Remove the API compatibility layer which converted add, sub, and mul
to fadd, fsub, and fmul, when used with a floating-point type. LLVM
has supported the new instructions since 2.6, so it's time to get
on board.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102971 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
551754c4958086cc6910da7c950f2875e212f5cf 17-Apr-2010 Eric Christopher <echristo@apple.com> Revert 101465, it broke internal OpenGL testing.

Probably the best way to know that all getOperand() calls have been handled
is to replace that API instead of updating.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101579 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
4ec2258ffb495d7ce00177e447740ef1123a27db 16-Apr-2010 Gabor Greif <ggreif@gmail.com> reapply r101434
with a fix for self-hosting

rotate CallInst operands, i.e. move callee to the back
of the operand array

the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
607a7ab3da72a2eb53553a520507cbb8068dd1d8 16-Apr-2010 Gabor Greif <ggreif@gmail.com> back out r101423 and r101397, they break llvm-gcc self-host on darwin10

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
2ff961f66816daab8bbc58a19025161d969821c2 15-Apr-2010 Gabor Greif <ggreif@gmail.com> reapply r101364, which has been backed out in r101368
with a fix

rotate CallInst operands, i.e. move callee to the back
of the operand array

the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101397 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
9ee17208115482441953127615231c59a2f4d052 15-Apr-2010 Gabor Greif <ggreif@gmail.com> back out r101364, as it trips the linux nightlybot on some clang C++ tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101368 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
165dac08d1bb8428b32a5f39cdd3dbee2888987f 15-Apr-2010 Gabor Greif <ggreif@gmail.com> rotate CallInst operands, i.e. move callee to the back
of the operand array

the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101364 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
7ad3b2a3f0188f5bceb4937e90085c52665672b4 14-Apr-2010 Dan Gohman <gohman@apple.com> Move a bunch of methods from CallSite to CallSiteBase, so that they can
be used in ImmutableCallSite too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101292 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
a5ced590c95035793c2ae19bf70d6a0ed2c822a6 08-Apr-2010 Dan Gohman <gohman@apple.com> Say bitcast instead of bitconvert.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100720 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
c8b82ccbcf3b2e2384d2c0b5176e7b0b40b7f82f 01-Apr-2010 Gabor Greif <ggreif@gmail.com> Introduce ImmutableCallSite, useful for contexts where no mutation
is necessary. Inherits from new templated baseclass CallSiteBase<>
which is highly customizable. Base CallSite on it too, in a configuration
that allows full mutation.
Adapt some call sites in analyses to employ ImmutableCallSite.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100100 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
f27e6088a3af277d5aeed7b554192cc62b7b40fd 25-Mar-2010 Eric Christopher <echristo@apple.com> Reapply r99451 with a fix to move the NoInline check to the cost functions
instead of InlineFunction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99483 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
0623e90398153be61226ad19f1b40d3817874526 25-Mar-2010 Eric Christopher <echristo@apple.com> Temporarily revert this, it's causing an issue with an internal project.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99451 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
c9f7500d1752feac7cece26d20007a99d21f677c 24-Mar-2010 Gabor Greif <ggreif@gmail.com> Finally land the InvokeInst operand reordering.
I have audited all getOperandNo calls now, fixing
hidden assumptions. CallSite related uglyness will
be eliminated successively.

Note this patch has a long and griveous history,
for all the back-and-forths have a look at
CallSite.h's log.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99399 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
a54934ae9d278448fb557366eb4a79a8cb3fc606 23-Mar-2010 Chris Lattner <sabre@nondot.org> add some accessors to callsite/callinst/invokeinst to check
for the noinline attribute, and make the inliner refuse to
inline a call site when the call site is marked noinline even
if the callee isn't. This fixes PR6682.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99341 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
050560e535fe10b59ba608f19b43cfecd02c75b7 23-Mar-2010 Gabor Greif <ggreif@gmail.com> word-o

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99275 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
1cde4af15712f6ccdb81ab540df800cda90d0d74 22-Mar-2010 Gabor Greif <ggreif@gmail.com> backing out r99170 because it still fails on clang-x86_64-darwin10-fnt

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99171 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
9b1061e2e3c3a463aa251e2e6631d5e4313a7ac6 22-Mar-2010 Gabor Greif <ggreif@gmail.com> Now that hopefully all direct accesses to InvokeInst operands are fixed
we can reapply the InvokeInst operand reordering patch. (see r98957).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99170 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
cc52ed0c4feec63e7a127462b78fd4a6b217f469 19-Mar-2010 Gabor Greif <ggreif@gmail.com> back out r98957, it broke http://smooshlab.apple.com:8010/builders/clang-x86_64-darwin10-fnt/builds/703 in the nightly test suite

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
f4f10e37791cef519a057d10d12f688333f554a7 19-Mar-2010 Gabor Greif <ggreif@gmail.com> Recommit r80858 again (which has been backed out in r80871).

This time I did a self-hosted bootstrap on Linux x86-64,
with no problems. Let's see how darwin 64-bit self-hosting
goes. At the first sign of failure I'll back this out.

Maybe the valgrind bots give me a hint of what may be wrong
(it at all).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98957 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
1df9859c40492511b8aa4321eb76496005d3b75b 16-Feb-2010 Duncan Sands <baldrick@free.fr> There are two ways of checking for a given type, for example isa<PointerType>(T)
and T->isPointerTy(). Convert most instances of the first form to the second form.
Requested by Chris.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96344 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
b0bc6c361da9009e8414efde317d9bbff755f6c0 15-Feb-2010 Duncan Sands <baldrick@free.fr> Uniformize the names of type predicates: rather than having isFloatTy and
isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
8991d51ddcea31e198aff1fd01c05af2679ee8f8 02-Feb-2010 Duncan Sands <baldrick@free.fr> Adding missing methods for creating Add, Mul, Neg and Sub with NUW.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
0b68a009f63412d4aa7c5f2d68b899e6e1dcc257 26-Jan-2010 Chris Lattner <sabre@nondot.org> fix CastInst::castIsValid to reject aggregate types, fixing PR6153:

llvm-as: t.ll:1:25: error: invalid cast opcode for cast from '[4 x i8]' to '[1 x i32]'
@x = constant [1 x i32] bitcast ([4 x i8] c"abcd" to [1 x i32])
^



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94595 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
f21107c07a16fd1a2548b83dd371e09b95784f05 26-Jan-2010 Dan Gohman <gohman@apple.com> Fix ICmpInst::makeConstantRange to use ConstantRange's API properly
in the case of empty and full ranges.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94548 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
33b1758e16f050c79fd7d93a04e3ef7aa2971b0c 23-Jan-2010 Chris Lattner <sabre@nondot.org> simplify code a bit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94281 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
e4a0a151a5164c3dfc7bc4d6a92d57e934a88213 23-Jan-2010 Mon P Wang <wangmp@apple.com> InstCombine should not fold sext/zext of a vector and a bitcast to a scalar to a sext/zext


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94280 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
36fe19837c0c44207d1cbd6040764928409f66d6 22-Jan-2010 Chris Lattner <sabre@nondot.org> add an out-of-line virtual method to CmpInst to give it a home.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94161 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
859c372e04f053daa85812f8b790d2b0d1645fee 10-Jan-2010 Chris Lattner <sabre@nondot.org> fix a buggy assertion, CreateIntegerCast should allow
integer vectors as well as just integers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93126 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
8c65f6e71c1d46d823b9a884819992a9255edd54 05-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> Move remaining stuff to the isInteger predicate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92771 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
11acaa374cdcebb161bf0de5f244265d78a749c1 05-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> Convert a ton of simple integer type equality tests to the new predicate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92760 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
f012705c7e4ca8cf90b6b734ce1d5355daca5ba5 05-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> Avoid going through the LLVMContext for type equality where it's safe to dereference the type pointer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92726 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
b2406d9895314cbc61183c2fb712cd1a2ddfe7e0 29-Dec-2009 Chris Lattner <sabre@nondot.org> sink the Instruction::HasMetadata bit into SubclassData.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92240 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
cafe9bba32aeed16e8e3db28b4cd4ff13160438f 29-Dec-2009 Chris Lattner <sabre@nondot.org> add a layer of accessors around the Value::SubClassData member, and use
a convention (shadowing the setter with private forwarding function) to
prevent subclasses from accidentally using it.

This exposed some bogosity in ConstantExprs, which was propaging the
opcode of the constant expr into the NUW/NSW/Exact field in the
getWithOperands/getWithOperandReplaced methods.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
bdc46c6af5ffcf3596a72df75880fe8703436060 18-Dec-2009 Dan Gohman <gohman@apple.com> Add utility routines for creating integer negation operators with NSW set.
Integer negation only overflows with INT_MIN, but that's an important case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91662 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
f06dca2918f9cf3c4540eba833e02e7ab08d91a1 10-Nov-2009 Victor Hernandez <vhernandez@apple.com> make this handle redefinition of malloc function with different prototype correctly

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86712 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
47fc9d336619f45c0d6c80750cfbeb01b7dda207 09-Nov-2009 Chris Lattner <sabre@nondot.org> make this handle redefinition of malloc with different prototype correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86525 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
d6e5763e12c5bfbde973698b07b4ea2025290e54 07-Nov-2009 Chris Lattner <sabre@nondot.org> prune #include / layering violation


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86365 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
4d81d97a063504a09a7b40429acfe4372e93ed31 07-Nov-2009 Victor Hernandez <vhernandez@apple.com> Fit in 80 columns

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86316 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
9d0b704e3ea418441001dac4d1a56c2c224cdbf5 07-Nov-2009 Victor Hernandez <vhernandez@apple.com> Re-commit r86077 now that r86290 fixes the 179.art and 175.vpr ARM regressions.

Here is the original commit message:

This commit updates malloc optimizations to operate on malloc calls that have constant int size arguments.

Update CreateMalloc so that its callers specify the size to allocate:
MallocInst-autoupgrade users use non-TargetData-computed allocation sizes.
Optimization uses use TargetData to compute the allocation size.

Now that malloc calls can have constant sizes, update isArrayMallocHelper() to use TargetData to determine the size of the malloced type and the size of malloced arrays.
Extend getMallocType() to support malloc calls that have non-bitcast uses.

Update OptimizeGlobalAddressOfMalloc() to optimize malloc calls that have non-bitcast uses. The bitcast use of a malloc call has to be treated specially here because the uses of the bitcast need to be replaced and the bitcast needs to be erased (just like the malloc call) for OptimizeGlobalAddressOfMalloc() to work correctly.

Update PerformHeapAllocSRoA() to optimize malloc calls that have non-bitcast uses. The bitcast use of the malloc is not handled specially here because ReplaceUsesOfMallocWithGlobal replaces through the bitcast use.

Update OptimizeOnceStoredGlobal() to not care about the malloc calls' bitcast use.

Update all globalopt malloc tests to not rely on autoupgraded-MallocInsts, but instead use explicit malloc calls with correct allocation sizes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86311 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
82ebca15a800d96d12394ffd5fa72631c54c8418 06-Nov-2009 Victor Hernandez <vhernandez@apple.com> CallInst::CreateMalloc() and CallInst::CreateFree() need to create calls with correct calling convention

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86290 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
df98761d08ae091420b7e9c1366de7684400fc36 06-Nov-2009 Victor Hernandez <vhernandez@apple.com> Revert r86077 because it caused crashes in 179.art and 175.vpr on ARM

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86213 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
24f934d0551e33508c4ffd24318ea0e970db9810 05-Nov-2009 Victor Hernandez <vhernandez@apple.com> Update CreateMalloc so that its callers specify the size to allocate:
MallocInst-autoupgrade users use non-TargetData-computed allocation sizes.
Optimization uses use TargetData to compute the allocation size.

Now that malloc calls can have constant sizes, update isArrayMallocHelper() to use TargetData to determine the size of the malloced type and the size of malloced arrays.
Extend getMallocType() to support malloc calls that have non-bitcast uses.

Update OptimizeGlobalAddressOfMalloc() to optimize malloc calls that have non-bitcast uses. The bitcast use of a malloc call has to be treated specially here because the uses of the bitcast need to be replaced and the bitcast needs to be erased (just like the malloc call) for OptimizeGlobalAddressOfMalloc() to work correctly.

Update PerformHeapAllocSRoA() to optimize malloc calls that have non-bitcast uses. The bitcast use of the malloc is not handled specially here because ReplaceUsesOfMallocWithGlobal replaces through the bitcast use.

Update OptimizeOnceStoredGlobal() to not care about the malloc calls' bitcast use.

Update all globalopt malloc tests to not rely on autoupgraded-MallocInsts, but instead use explicit malloc calls with correct allocation sizes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86077 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
a4c206febea2cd77571bd04f97353ff4e027e6e2 29-Oct-2009 Chris Lattner <sabre@nondot.org> add sanity check for indbr.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85496 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
ab21db79ef1d2530880ad11f21f0b87ffca02dd4 28-Oct-2009 Chris Lattner <sabre@nondot.org> rename indbr -> indirectbr to appease the residents of #llvm.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85351 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
50b6e33584f4e4cf75c7795b1f1a90731861c825 27-Oct-2009 Devang Patel <dpatel@apple.com> Factor out redundancy from clone() implementations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85327 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
f9be95f867745b6754b2402b9b72f9eaeabd637f 27-Oct-2009 Chris Lattner <sabre@nondot.org> add enough support for indirect branch for the feature test to pass
(assembler,asmprinter, bc reader+writer) and document it. Codegen
currently aborts on it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85274 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
046e78ce55a7c3d82b7b6758d2d77f2d99f970bf 27-Oct-2009 Victor Hernandez <vhernandez@apple.com> Remove FreeInst.
Remove LowerAllocations pass.
Update some more passes to treate free calls just like they were treating FreeInst.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85176 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
4a134afaef984c403f6d6b1da4d301666d899b92 25-Oct-2009 Nick Lewycky <nicholas@mxc.ca> Remove ICmpInst::isSignedPredicate which was a reimplementation
CmpInst::isSigned.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85037 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
44df023d5f56e301d6280df20e36e68b1c4a761e 25-Oct-2009 Nick Lewycky <nicholas@mxc.ca> Sink isTrueWhenEqual from ICmpInst to CmpInst. Add a matching isFalseWhenEqual
which is equal to !isTrueWhenEqual for ints but not for floats.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85036 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
66284e063a1e46500acae48bdc0e4a00652021d1 24-Oct-2009 Victor Hernandez <vhernandez@apple.com> Auto-upgrade free instructions to calls to the builtin free function.
Update all analysis passes and transforms to treat free calls just like FreeInst.
Remove RaiseAllocations and all its tests since FreeInst no longer needs to be raised.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
7b929dad59785f62a66f7c58615082f98441e95e 23-Oct-2009 Victor Hernandez <vhernandez@apple.com> Remove AllocationInst. Since MallocInst went away, AllocaInst is the only subclass of AllocationInst, so it no longer is necessary.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84969 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
3fc35c594cbe48070ad69eaa2fdca1e9424c9fd4 18-Oct-2009 Nick Lewycky <nicholas@mxc.ca> Fix test/Bindings/Ocaml/vmcore.ml. When IRBuilder::CreateMalloc was removed,
LLVMBuildMalloc was reimplemented but with the bug that it didn't insert the
resulting instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84374 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
a276c603b82a11b0bf0b59f0517a69e4b63adeab 17-Oct-2009 Victor Hernandez <vhernandez@apple.com> Remove MallocInst from LLVM Instructions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84299 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
13ad5aaaff8a446758b402fd5e9aea22f5bc5682 17-Oct-2009 Victor Hernandez <vhernandez@apple.com> Autoupgrade malloc insts to malloc calls.
Update testcases that rely on malloc insts being present.

Also prematurely remove MallocInst handling from IndMemRemoval and RaiseAllocations to help pass tests in this incremental step.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84292 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
ac53a0b272452013124bfc70480aea5e41b60f40 06-Oct-2009 Duncan Sands <baldrick@free.fr> Introduce and use convenience methods for getting pointer types
where the element is of a basic builtin type. For example, to get
an i8* use getInt8PtrTy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83379 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
ae05e7d945aee2846370313e90d2a735f9696a71 27-Sep-2009 Nick Lewycky <nicholas@mxc.ca> Round out the API for the new optimization flags.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
6776064d190701c5bae4d5403939eed2e480d1cd 27-Sep-2009 Nick Lewycky <nicholas@mxc.ca> Instruction::clone does not need to take an LLVMContext&. Remove that and
update all the callers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82889 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
3e0c99a26f365bddb667124db40a5734e35c5a2d 25-Sep-2009 Victor Hernandez <vhernandez@apple.com> Revert 82694 "Auto-upgrade malloc instructions to malloc calls." because it causes regressions in the nightly tests.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82784 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
96b930ddc7f0df9e278a5cb65ad77a559a20964e 24-Sep-2009 Victor Hernandez <vhernandez@apple.com> Auto-upgrade malloc instructions to malloc calls.

Reviewed by Devang Patel.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82694 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
6c6c016b1b9711bc8968b51746d4b867e17905f4 23-Sep-2009 Devang Patel <dpatel@apple.com> Do not leave behind metadata while cloning an instruction.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
0e657faee5b34b6967c2d0c9966e4e4146427835 22-Sep-2009 Chris Lattner <sabre@nondot.org> tidy up


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82489 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
88d9839d07a6b5a03484d664913de0f2b33d3bff 18-Sep-2009 Victor Hernandez <vhernandez@apple.com> Update malloc call creation code (AllocType is now the element type of the malloc, not the resulting type).

In getMallocArraySize(), fix bug in the case that array size is the product of 2 constants.

Extend isArrayMalloc() and getMallocArraySize() to handle case where malloc is used as char array.

Ensure that ArraySize in LowerAllocations::runOnBasicBlock() is correct type.

Extend Instruction::isSafeToSpeculativelyExecute() to handle malloc calls.

Add verification for malloc calls.

Reviewed by Dan Gohman.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82257 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
37acc1aac7731aaf7203a9b59f8398d5e6ba04bd 12-Sep-2009 Daniel Dunbar <daniel@zuster.org> Fix -Asserts warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81580 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
c24edfaee2906bfe13cb1af48be020adf0f8c14f 11-Sep-2009 Dan Gohman <gohman@apple.com> Fix indentation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81484 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
b84c5ae3d4d34d2e4cafbd7c1281de771b813a09 10-Sep-2009 Benjamin Kramer <benny.kra@googlemail.com> Add some braces to make newer GCCs happy and update CMakeLists.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81443 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
fabcb9127f278a77b8aae5673be1115390c55050 10-Sep-2009 Evan Cheng <evan.cheng@apple.com> Add malloc call utility functions. Patch by Victor Hernandez.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81426 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
f8dbee7cea072eb63ae343759975109553697bcb 08-Sep-2009 Dan Gohman <gohman@apple.com> Reappy r80998, now that the GlobalOpt bug that it exposed on MiniSAT is fixed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81172 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
92a97a9166e359e195d949e63d7e24a4a33284cf 06-Sep-2009 Daniel Dunbar <daniel@zuster.org> Revert "Include optional subclass flags, such as inbounds, nsw, etc., ...", this
breaks MiniSAT on x86_64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81098 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
859fff476dfe8d83abdf4621b1d20062c0daa85c 04-Sep-2009 Dan Gohman <gohman@apple.com> Include optional subclass flags, such as inbounds, nsw, etc., in the
Constant uniquing tables. This allows distinct ConstantExpr objects
with the same operation and different flags.

Even though a ConstantExpr "a + b" is either always overflowing or
never overflowing (due to being a ConstantExpr), it's still necessary
to be able to represent it both with and without overflow flags at
the same time within the IR, because the safety of the flag may
depend on the context of the use. If the constant really does overflow,
it wouldn't ever be safe to use with the flag set, however the use
may be in code that is never actually executed.

This also makes it possible to merge all the flags tests into a single test.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80998 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
bccfc24c4e8092e1ee18746dd4cee01247728faa 03-Sep-2009 Dan Gohman <gohman@apple.com> Change PHINode::hasConstantValue to have a DominatorTree argument
instead of a bool argument, and to do the dominator check itself.
This makes it eaiser to use when DominatorTree information is
available.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80920 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
03a5f139fb7d3e9c49fe95aea4c717fab2285d82 03-Sep-2009 Gabor Greif <ggreif@gmail.com> back out my recent commit (r80858), it seems to break self-hosting buildbot's stage 2 configure

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80871 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
190390b8d31af0a549827478911b322af4bc111a 03-Sep-2009 Gabor Greif <ggreif@gmail.com> re-commit r66920 (which has been backed out in r66953) I may have more luck this time. I'll back out if needed...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80858 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
65c3c8f323198b99b88b109654194540cf9b3fa5 02-Sep-2009 Sandeep Patel <deeppatel1987@gmail.com> Retype from unsigned to CallingConv::ID accordingly. Approved by Bob Wilson.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80773 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
638d853ef028b446715ac4e0b1a059d68769b465 26-Aug-2009 Dan Gohman <gohman@apple.com> Fix the InsertAtEnd form of ShuffleVectorInst constructor to use
the correct type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80050 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
1c8a23c440b1665ba422778cdc74a0c59ecaf39e 26-Aug-2009 Dan Gohman <gohman@apple.com> Eliminate the unused Context argument on one of the ICmpInst and FCmpInst
constructors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80049 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
30f809196362b497eef743ef60acd0724e97654b 26-Aug-2009 Dan Gohman <gohman@apple.com> Use covariant return types for Instruction::clone, and eliminate
the forms of ExtractElementInst and InsertElementInst that are
equivalent to clone.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80041 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
58cfa3b13752579c86cf85270d49f9ced0942f2f 26-Aug-2009 Dan Gohman <gohman@apple.com> Rename Instruction::isIdenticalTo to Instruction::isIdenticalToWhenDefined,
and introduce a new Instruction::isIdenticalTo which tests for full
identity, including the SubclassOptionalData flags. Also, fix the
Instruction::clone implementations to preserve the SubclassOptionalData
flags. Finally, teach several optimizations how to handle
SubclassOptionalData correctly, given these changes.

This fixes the counterintuitive behavior of isIdenticalTo not comparing
the full value, and clone not returning an identical clone, as well as
some subtle bugs that could be caused by these.

Thanks to Nick Lewycky for reporting this, and for an initial patch!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80038 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
1d0be15f89cb5056e20e2d24faa8d6afb1573bca 13-Aug-2009 Owen Anderson <resistor@mac.com> Push LLVMContexts through the IntegerType APIs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
4ae5126d041768ab9665cf2f11c024becd76c41f 12-Aug-2009 Dan Gohman <gohman@apple.com> Remove a bunch more now-unnecessary Context arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78809 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
3603d7a3528e6f3402ea4f7057a0b7cc5cc6488b 11-Aug-2009 Daniel Dunbar <daniel@zuster.org> Revert 78680 until I figure out why it completely broke things.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78697 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
c588d558100b488ff20f560b5c35d3bec4790aff 11-Aug-2009 Daniel Dunbar <daniel@zuster.org> Remove some unnecessary LoadInst constructors, missed during Twinification.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78689 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
a7235ea7245028a0723e8ab7fd011386b3900777 31-Jul-2009 Owen Anderson <resistor@mac.com> Move a few more APIs back to 2.5 forms. The only remaining ones left to change back are
metadata related, which I'm waiting on to avoid conflicting with Devang.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77721 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
9e9a0d5fc26878e51a58a8b57900fcbf952c2691 31-Jul-2009 Owen Anderson <resistor@mac.com> Move more code back to 2.5 APIs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77635 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
debcb01b0f0a15f568ca69e8f288fade4bfc7297 30-Jul-2009 Owen Anderson <resistor@mac.com> Move types back to the 2.5 API.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77516 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
af7ec975870f92245f1f1484ac80a1e2db6a0afa 28-Jul-2009 Owen Anderson <resistor@mac.com> Return ConstantVector to 2.5 API.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
6f83c9c6ef0e7f79825a0a8f22941815e4b684c7 27-Jul-2009 Owen Anderson <resistor@mac.com> Move ConstantFP construction back to the 2.5-ish API.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77247 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
6e0d1cb30957a636c53158d3089e6fb88348a57a 25-Jul-2009 Daniel Dunbar <daniel@zuster.org> Initial update to VMCore to use Twines for string arguments.
- The only meat here is in Value.{h,cpp} the rest is essential 'const
std::string &' -> 'const Twine &'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
a3500da5592aee83675d6714d4f1e9d5ad96d1f2 25-Jul-2009 Eric Christopher <echristo@apple.com> Move ExtractElementInst to ::Create instead of new. Update all uses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77044 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
fd87a544c00c2ca04ee23aae67bbcad4dc852a54 25-Jul-2009 Dan Gohman <gohman@apple.com> Convert a few more things to use raw_ostream.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77039 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
eed707b1e6097aac2bb6b3d47271f6300ace7f2e 25-Jul-2009 Owen Anderson <resistor@mac.com> Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types. More to come.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77011 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
295643b8050d4c45b06032690d707e7281e82c92 22-Jul-2009 Dan Gohman <gohman@apple.com> Permit the IntPtrTy argument to isEliminableCastPair to be null,
to help support use when TargetData is not available.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76675 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
f2411744214dad8c71044aac2977ca77e9ebf028 20-Jul-2009 Dan Gohman <gohman@apple.com> Revert the addition of hasNoPointerOverflow to GEPOperator.
Getelementptrs that are defined to wrap are virtually useless to
optimization, and getelementptrs that are undefined on any kind
of overflow are too restrictive -- it's difficult to ensure that
all intermediate addresses are within bounds. I'm going to take
a different approach.

Remove a few optimizations that depended on this flag.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76437 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
5c2cb324d8d6380e8753b7022a6bc0b49809701b 17-Jul-2009 Dan Gohman <gohman@apple.com> Add a GEPOperator class, and move the hasNoPointerOverflow
accessors into it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76245 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
ff141c20627f58ffef390e04d40c9e4df820003e 17-Jul-2009 Dan Gohman <gohman@apple.com> Fix a typo that Duncan spotted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76233 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
1bd9f58d6dd26ad8085e90a753d0a9aa76fb15e3 17-Jul-2009 Dan Gohman <gohman@apple.com> GetElementPtr instructions default to having no overflow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76222 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
6687990ca813b5c736214c5ec2d3c9f6279c5fd4 16-Jul-2009 Owen Anderson <resistor@mac.com> Now that we have contexts on types, convert some more internals to use contexts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75866 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
50dead06ffc107edb7e84857baaeeb09039c631c 16-Jul-2009 Owen Anderson <resistor@mac.com> Revert yesterday's change by removing the LLVMContext parameter to AllocaInst and MallocInst.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75863 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
a90b3dc2f1f70ab7102ec3f1fc57f199fd56d7cc 15-Jul-2009 Owen Anderson <resistor@mac.com> Move a few more convenience factory functions from Constant to LLVMContext.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75840 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
9adc0abad3c3ed40a268ccbcee0c74cb9e1359fe 15-Jul-2009 Owen Anderson <resistor@mac.com> Move EVER MORE stuff over to LLVMContext.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75703 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
c23197a26f34f559ea9797de51e187087c039c42 14-Jul-2009 Torok Edwin <edwintorok@gmail.com> llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.
This adds location info for all llvm_unreachable calls (which is a macro now) in
!NDEBUG builds.
In NDEBUG builds location info and the message is off (it only prints
"UREACHABLE executed").


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75640 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
fa82b6eba4e1584d7dba291c28fe908272e1e002 14-Jul-2009 Owen Anderson <resistor@mac.com> These don't really need contexts either.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75528 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
73c6b7127aff4499e4d6a2edb219685aee178ee1 13-Jul-2009 Owen Anderson <resistor@mac.com> Move more functionality over to LLVMContext.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75497 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
0a5372ed3e8cda10d724feda3c1a1c998db05ca0 13-Jul-2009 Owen Anderson <resistor@mac.com> Begin the painful process of tearing apart the rat'ss nest that is Constants.cpp and ConstantFold.cpp.
This involves temporarily hard wiring some parts to use the global context. This isn't ideal, but it's
the only way I could figure out to make this process vaguely incremental.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75445 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
c25e7581b9b8088910da31702d4ca21c4734c6d7 11-Jul-2009 Torok Edwin <edwintorok@gmail.com> assert(0) -> LLVM_UNREACHABLE.
Make llvm_unreachable take an optional string, thus moving the cerr<< out of
line.
LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for
NDEBUG builds.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75379 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
333c40096561218bc3597cf153c0a3895274414c 10-Jul-2009 Owen Anderson <resistor@mac.com> This started as a small change, I swear. Unfortunately, lots of things call the [I|F]CmpInst constructors. Who knew!?


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75200 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
dac237e18209b697a8ba122d0ddd9cad4dfba1f8 08-Jul-2009 Torok Edwin <edwintorok@gmail.com> Implement changes from Chris's feedback.
Finish converting lib/Target.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75043 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
ab7c09b6b6f4516a631fd6788918c237c83939af 08-Jul-2009 Torok Edwin <edwintorok@gmail.com> Start converting to new error handling API.
cerr+abort -> llvm_report_error
assert(0)+abort -> LLVM_UNREACHABLE (assert(0)+llvm_unreachable-> abort() included)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75018 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
7f6aa2b162e5daaf7b9ccf05d749597d3d7cf460 08-Jul-2009 Nick Lewycky <nicholas@mxc.ca> Remove the vicmp and vfcmp instructions. Because we never had a release with
these instructions, no autoupgrade or backwards compatibility support is
provided.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74991 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
f57478f381e77e3afd8139fabe7faed991b40d69 16-Jun-2009 Dan Gohman <gohman@apple.com> Use Type::isIntOrIntVector and Type::isFPOrFPVector.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73433 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
6de29f8d960505421d61c80cdb738e16720b6c0e 16-Jun-2009 Dan Gohman <gohman@apple.com> Support vector casts in more places, fixing a variety of assertion
failures.

To support this, add some utility functions to Type to help support
vector/scalar-independent code. Change ConstantInt::get and
ConstantFP::get to support vector types, and add an overload to
ConstantInt::get that uses a static IntegerType type, for
convenience.

Introduce a new getConstant method for ScalarEvolution, to simplify
common use cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73431 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
a119de86a064414622562cfe32953de7f9b0ee40 15-Jun-2009 Dan Gohman <gohman@apple.com> Fix old-style type names in comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73362 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
ae3a0be92e33bc716722aa600983fc1535acb122 05-Jun-2009 Dan Gohman <gohman@apple.com> Split the Add, Sub, and Mul instruction opcodes into separate
integer and floating-point opcodes, introducing
FAdd, FSub, and FMul.

For now, the AsmParser, BitcodeReader, and IRBuilder all preserve
backwards compatability, and the Core LLVM APIs preserve backwards
compatibility for IR producers. Most front-ends won't need to change
immediately.

This implements the first step of the plan outlined here:
http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72897 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
16899a205638b81be8537526e34ad35ce3472299 18-May-2009 Dan Gohman <gohman@apple.com> Revert r72025. It is possible for clients to convert between signed types
and pointer types safely if they only do so when the sizes are the same.
llvm-gcc is such a client.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72029 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
c7897e26a45b06fc8c739443fb75c9c6bb908ec5 18-May-2009 Dan Gohman <gohman@apple.com> Add assertions to CastInst::getCastOpcode to catch attempted conversions
between integers and pointers when the source type is marked signed,
since inttoptr and ptrtoint always use zero-extension when the destination
is larger than the source.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72025 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
9a507cd915e6460bc7dadee2185c53df326274c1 13-Mar-2009 Bill Wendling <isanbard@gmail.com> Revert r66920. It was causing failures in the self-hosting buildbot (in release
mode).

Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/dg.exp ...
FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll
Failed with signal(SIGBUS) at line 1
while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll -bugpoint-crashcalls -silence-passes > /dev/null
0 bugpoint 0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85
1 bugpoint 0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706
2 libSystem.B.dylib 0x92f112bb _sigtramp + 43
3 libSystem.B.dylib 0xffffffff _sigtramp + 1829694831
4 bugpoint 0x00021d1c main + 92
5 bugpoint 0x00002106 start + 54
6 bugpoint 0x00000004 start + 18446744073709543220
Stack dump:
0. Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/crash-narrowfunctiontest.ll -bugpoint-crashcalls -silence-passes

FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll
Failed with signal(SIGBUS) at line 1
while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll -dce -bugpoint-deletecalls -simplifycfg -silence-passes
0 bugpoint 0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85
1 bugpoint 0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706
2 libSystem.B.dylib 0x92f112bb _sigtramp + 43
3 libSystem.B.dylib 0xffffffff _sigtramp + 1829694831
4 bugpoint 0x00021d1c main + 92
5 bugpoint 0x00002106 start + 54
6 bugpoint 0x00000006 start + 18446744073709543222
Stack dump:
0. Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/misopt-basictest.ll -dce -bugpoint-deletecalls -simplifycfg -silence-passes

FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll
Failed with signal(SIGBUS) at line 1
while running: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll -bugpoint-crashcalls -silence-passes
0 bugpoint 0x0035dd25 llvm::sys::SetInterruptFunction(void (*)()) + 85
1 bugpoint 0x0035e382 llvm::sys::RemoveFileOnSignal(llvm::sys::Path const&, std::string*) + 706
2 libSystem.B.dylib 0x92f112bb _sigtramp + 43
3 libSystem.B.dylib 0xffffffff _sigtramp + 1829694831
4 bugpoint 0x00021d1c main + 92
5 bugpoint 0x00002106 start + 54
Stack dump:
0. Program arguments: bugpoint /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/test/BugPoint/remove_arguments_test.ll -bugpoint-crashcalls -silence-passes

--- Reverse-merging (from foreign repository) r66920 into '.':
U include/llvm/Support/CallSite.h
U include/llvm/Instructions.h
U lib/Analysis/IPA/GlobalsModRef.cpp
U lib/Analysis/IPA/Andersens.cpp
U lib/Bitcode/Writer/BitcodeWriter.cpp
U lib/VMCore/Instructions.cpp
U lib/VMCore/Verifier.cpp
U lib/VMCore/AsmWriter.cpp
U lib/Transforms/Utils/LowerInvoke.cpp
U lib/Transforms/Scalar/SimplifyCFGPass.cpp
U lib/Transforms/IPO/PruneEH.cpp
U lib/Transforms/IPO/DeadArgumentElimination.cpp



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66953 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
b14cda3c0dea98bdd44c2f209afaf4fb36d42a8a 13-Mar-2009 Gabor Greif <ggreif@gmail.com> Second installment of "BasicBlock operands to the back"
changes.

For InvokeInst now all arguments begin at op_begin().
The Callee, Cont and Fail are now faster to get by
access relative to op_end().

This patch introduces some temporary uglyness in CallSite.
Next I'll bring CallInst up to a similar scheme and then
the uglyness will magically vanish.

This patch also exposes all the reliance of the libraries
on InvokeInst's operand ordering. I am thinking of taking
care of that too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66920 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
ae5a20a9177650525b40ed88c8326a398e6caa8a 12-Mar-2009 Gabor Greif <ggreif@gmail.com> Rearrange operands of the BranchInst, to be able to
access each with a fixed negative index from op_end().

This has two important implications:
- getUser() will work faster, because there are less iterations
for the waymarking algorithm to perform. This is important
when running various analyses that want to determine callers
of basic blocks.
- getSuccessor() now runs faster, because the indirection via OperandList
is not necessary: Uses corresponding to the successors are at fixed
offset to "this".

The price we pay is the slightly more complicated logic in the operator
User::delete, as it has to pick up the information whether it has to free
the memory of an original unconditional BranchInst or a BranchInst that
was originally conditional, but has been shortened to unconditional.
I was not able to come up with a nicer solution to this problem. (And
rest assured, I tried *a lot*).

Similar reorderings will follow for InvokeInst and CallInst. After that
some optimizations to pred_iterator and CallSite will fall out naturally.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66815 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
bce6091d95b7fd56d7c6760b0de54fb6c4300539 09-Mar-2009 Chris Lattner <sabre@nondot.org> fix Analysis/BasicAA/2004-12-08-BasicAACrash.ll by allowing opaque types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
c66996ab3451a29a207e7871b0cbf984beaf941c 09-Mar-2009 Chris Lattner <sabre@nondot.org> Fix PR3746 - Crash in isel with GEP of function pointer
by checking that the top-level type of a gep is sized. This
causes us to reject the example with:

llvm-as: t2.ll:2:16: invalid getelementptr indices
getelementptr i32()* null, i32 1
^



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66393 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
255b26ea3529ca096313c85dcf006565c7e916f9 11-Jan-2009 Gabor Greif <ggreif@gmail.com> simplify CallSite helper class to not consult the Instruction's
opcode on each delegation.
Instead the information is cached on construction and the cached flag used thereafter.
Introduced two predicates: isCall and isInvoke.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62055 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
b76ec320dc2d612990139122c01a1945f9d0e654 29-Dec-2008 Chris Lattner <sabre@nondot.org> move select validation logic into a shared place where the select ctor,
verifier, asm parser, etc can share it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61461 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
c5dd22a3338e089a75ad4a1c2b5cc120a82f9f77 26-Nov-2008 Chris Lattner <sabre@nondot.org> add a long-overdue AllocaInst::isStaticAlloca method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60080 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
59500c8f9a76b3386329b6f837255c16f4e8b61b 21-Nov-2008 Devang Patel <dpatel@apple.com> Silence unused variable warnings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59841 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
aeb06d246254e4829a49164a11eacced9a43d9d4 10-Nov-2008 Mon P Wang <wangmp@apple.com> Added support for the following definition of shufflevector
<result> = shufflevector <n x <ty>> <v1>, <n x <ty>> <v2>, <m x i32> <mask>



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58964 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
8c3b47f623b9531c7bd962b9d3c0caeec668b395 05-Nov-2008 Devang Patel <dpatel@apple.com> Silence unused variable warnings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58743 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
0598866c052147c31b808391f58434ce3dbfb838 25-Sep-2008 Devang Patel <dpatel@apple.com> Large mechanical patch.

s/ParamAttr/Attribute/g
s/PAList/AttrList/g
s/FnAttributeWithIndex/AttributeWithIndex/g
s/FnAttr/Attribute/g

This sets the stage
- to implement function notes as function attributes and
- to distinguish between function attributes and return value attributes.

This requires corresponding changes in llvm-gcc and clang.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56622 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
eaf42abab6d465c38891345d999255871cf03943 24-Sep-2008 Devang Patel <dpatel@apple.com> s/ParameterAttributes/Attributes/g



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56513 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
7f8613e5b8398b688080e3c944ab8c11593e1ed0 14-Aug-2008 Dan Gohman <gohman@apple.com> Improve support for vector casts in LLVM IR and CodeGen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54784 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
5bc1ea0736a5785ed596d58beeff2ab23909e33d 29-Jul-2008 Nate Begeman <natebegeman@mac.com> Add vector shifts to the IR, patch by Eli Friedman.
CodeGen & Clang work coming next.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54161 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
e2afdedec5f876b88384e21a3e18f48444989346 29-Jul-2008 Matthijs Kooijman <matthijs@stdin.nl> Add a GetElementPtrInst::getIndexedType that accepts uint64_t's instead of just Value*'s.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54157 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
b4ab9d69dab3ca491a2b5aefacb89611641f5f03 25-Jul-2008 Nate Begeman <natebegeman@mac.com> Tab removal


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54025 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
fc74abfba5128544a750fce22fdf13eb0403e3ce 23-Jul-2008 Dan Gohman <gohman@apple.com> Enable first-class aggregates support.

Remove the GetResultInst instruction. It is still accepted in LLVM assembly
and bitcode, where it is now auto-upgraded to ExtractValueInst. Also, remove
support for return instructions with multiple values. These are auto-upgraded
to use InsertValueInst instructions.

The IRBuilder still accepts multiple-value returns, and auto-upgrades them
to InsertValueInst instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53941 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
2e033f31dc229db8d5c84f19530b7d2ddc175f44 08-Jul-2008 Duncan Sands <baldrick@free.fr> Add some convenience methods for manipulating
call attributes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
2f27e174a9a197701ec88478e2fce5d768d21176 23-Jun-2008 Dan Gohman <gohman@apple.com> Remove two convenience constructors because they're now private, and the
private implementation doesn't really need the convenience.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52629 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
7894ea75b5e25b2ca354a79f7b552ea941d157d8 23-Jun-2008 Dan Gohman <gohman@apple.com> Use std::copy instead of a loop.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52628 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
09ef00f97976b6bc745b804baa6dec1ee79fd343 20-Jun-2008 Dan Gohman <gohman@apple.com> Simplify this code. Thanks Chris!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52514 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
80b9626ee30a2cb32641ed15d00c0c1a634e275a 18-Jun-2008 Dan Gohman <gohman@apple.com> In InsertValueInst's copy ctor, actually copy the operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
b79bf1966dfee044510d365a952ae550091d9d91 17-Jun-2008 Dan Gohman <gohman@apple.com> Implement the ExtractValueInst::getIndexedType that accepts one
index value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52432 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
6520aa0f5ee12873ee85a34e17e628803f776b1a 16-Jun-2008 Chris Lattner <sabre@nondot.org> fix pr2460


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52294 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
76aca6f38f28a8796d1d1ab60080668d3c7ba4b8 06-Jun-2008 Gabor Greif <ggreif@gmail.com> get rid of ExtractValueInst::init's Value argument, it is already passed to the UnaryInstruction ctor

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52064 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
d4f268bdd47db4db384483db63c3b09f67e9da6a 06-Jun-2008 Gabor Greif <ggreif@gmail.com> make ExtractValueInst derived from UnaryInstruction

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52061 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
045b3f7bf1f136f609d64e50b3737b6eccae1ed8 05-Jun-2008 Matthijs Kooijman <matthijs@stdin.nl> * Make CallSite::hasArgument const and let it take a const parameter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
9515a8f88a597e78c32c797e4946ebf7648512c0 04-Jun-2008 Matthijs Kooijman <matthijs@stdin.nl> Add CallSite::hasArgument to allow for seeing if a call passes a certain value as an argument quickly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51946 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
338169ddc9bb4061f248d0afbf0ec87b6bf2227d 04-Jun-2008 Matthijs Kooijman <matthijs@stdin.nl> Add a Name parameter to two of the init methods of GetElementPointer to make the name setting more consistent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
444099f615c8eebea8d1f22cbad9dfb5664a16e9 04-Jun-2008 Matthijs Kooijman <matthijs@stdin.nl> Implement the two constructors in InsertValueInst and ExtractValueInst.

Add a Name argment to two init methods in these classes as well to make things
a bit more consistent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51937 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
7e2dd6628e398f369a110856ec69455f65d17638 31-May-2008 Dan Gohman <gohman@apple.com> Factor several methods, including getInversePredicate and
getSwappedPredicate, from ICmpInst and FCmpInst into common
methods in CmpInst. This allows CmpInsts to be manipulated
generically.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51810 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
81a0c0b44e582baca8b68754a7fcabfc3aef2e7a 31-May-2008 Dan Gohman <gohman@apple.com> IR, bitcode reader, bitcode writer, and asmparser changes to
insertvalue and extractvalue to use constant indices instead of
Value* indices. And begin updating LangRef.html.

There's definately more to come here, but I'm checking this
basic support in now to make it available to people who are
interested.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51806 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
3d8710e80acf496657feb092a79d226913742593 27-May-2008 Gabor Greif <ggreif@gmail.com> prune unneeded #includes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51590 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
b9d9eba9163ab6b2afe2d178b2377dc2a4f949c7 27-May-2008 Gabor Greif <ggreif@gmail.com> remove unneeded reinterpret_casts

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51589 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
9a6246c7349e4f09af794d889d23fd3de9a9aac4 27-May-2008 Gabor Greif <ggreif@gmail.com> We have the correct headers included to know that BB isa Value. No reinterpret_cast necessary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51588 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
6c80c381601b17207b6b8f898cfe273a37584d52 26-May-2008 Gabor Greif <ggreif@gmail.com> eliminate calls to deprecated Use::init() interface

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51570 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
e4569943d936d73dec6f36f545e9902095bd3fd8 23-May-2008 Dan Gohman <gohman@apple.com> Add more IR support for the new extractvalue and insertvalue
instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51461 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
0bf7b414ae0bb6699cadc3a210d18cfec44e9354 16-May-2008 Eric Christopher <echristo@apple.com> Add functions to enable adding a single attribute to a function and
its associated call site.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51204 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
7cbd8a3e92221437048b484d5ef9c0a22d0f8c58 16-May-2008 Gabor Greif <ggreif@gmail.com> API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. Legacy interfaces will be in place for some time. (Merge from use-diet branch.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51200 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
eedff319dc24652431cafc9df8ff84d26f9cdc9d 16-May-2008 Dan Gohman <gohman@apple.com> Revert the change from r51157 in
test/Verifier/2002-11-05-GetelementptrPointers.ll, which was incorrect.
Instead, fix getIndexedType to not follow pointer types, as
PointerType is a subclass of CompositeType.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51171 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
041e2eb51721bcfecee5d9c9fc409ff185526e47 15-May-2008 Dan Gohman <gohman@apple.com> IR support for extractvalue and insertvalue instructions. Also, begin
moving toward making structs and arrays first-class types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51157 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
b1dbcd886a4b5597a839f299054b78b33fb2d6df 15-May-2008 Gabor Greif <ggreif@gmail.com> Fix a bunch of 80col violations that arose from the Create API change. Tweak makefile targets to find these better.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51143 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
94fb68ba217975d2d99ae86d15993402158ac655 14-May-2008 Gabor Greif <ggreif@gmail.com> Merge of r51073-51074 from use-diet branch.

Do not rely on std::swap<Use>, provide a (faster) member function instead.
This change is primarily necessitated by MSVC++'s incompatibility with
declaring std::swap<Use> to be a friend of Use.

Also contains some minor tweaks to Use inline functions,
to undo pointless changes that sneaked in with the last merge.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51078 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
d6a221858610a67d475e347ece92087551112ebc 13-May-2008 Gabor Greif <ggreif@gmail.com> Derive GetResultInst from UnaryInstruction, this simplifies code and removes a FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51023 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
c83ad0d8e7c845c53874d150df2f0503cc77f6e6 12-May-2008 Nate Begeman <natebegeman@mac.com> Pointer comparisons should be handled by icmp, not vicmp :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50994 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
18e4e8500f2913b8db629d9c28353023735af732 12-May-2008 Nate Begeman <natebegeman@mac.com> Hard code CmpInst back to i1 for now while I go track down what in the bitcode reader/writer is assuming i1
This was breaking a bunch of tests


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50992 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
ac80ade1580378e484e24c9f66d2fa5b058e5891 12-May-2008 Nate Begeman <natebegeman@mac.com> Add two new instructions to the llvm IR, vicmp and vfcmp. see updated LangRef
for details. CodeGen support coming in a follow up patch


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
9b38d7db6d9fbb5bf9d16bec590a17c5895453e1 12-May-2008 Dan Gohman <gohman@apple.com> Update comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50974 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
efe65369a74871c3140a540a6c95ce5d1f080954 10-May-2008 Gabor Greif <ggreif@gmail.com> merge of use-diet branch to trunk

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
d52b62ae05f75032cdc2077a320d0a4934b2b27f 23-Apr-2008 Chris Lattner <sabre@nondot.org> Enforce that multiple return values have to have at least one result.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
051a950000e21935165db56695e35bade668193b 06-Apr-2008 Gabor Greif <ggreif@gmail.com> API changes for class Use size reduction, wave 1.
Specifically, introduction of XXX::Create methods
for Users that have a potentially variable number of
Uses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49277 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
52837078c79a42712812c8f2f35a61a93f9921cc 24-Mar-2008 Dan Gohman <gohman@apple.com> Shrink the size of AllocationInst by using its SubclassData
field to store the alignment value instead of haing a
separate field.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48727 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
d5d94df73f2af639a4cffc7e4f3491001817df08 13-Mar-2008 Chris Lattner <sabre@nondot.org> move a bunch of trivial methods to be inline.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48326 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
58d74910c6b82e622ecbb57d6644d48fec5a5c0f 12-Mar-2008 Chris Lattner <sabre@nondot.org> Reimplement the parameter attributes support, phase #1. hilights:

1. There is now a "PAListPtr" class, which is a smart pointer around
the underlying uniqued parameter attribute list object, and manages
its refcount. It is now impossible to mess up the refcount.
2. PAListPtr is now the main interface to the underlying object, and
the underlying object is now completely opaque.
3. Implementation details like SmallVector and FoldingSet are now no
longer part of the interface.
4. You can create a PAListPtr with an arbitrary sequence of
ParamAttrsWithIndex's, no need to make a SmallVector of a specific
size (you can just use an array or scalar or vector if you wish).
5. All the client code that had to check for a null pointer before
dereferencing the pointer is simplified to just access the
PAListPtr directly.
6. The interfaces for adding attrs to a list and removing them is a
bit simpler.

Phase #2 will rename some stuff (e.g. PAListPtr) and do other less
invasive changes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48289 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
41e2397b720bc5d917ef614a7a6c257e8a3c8e42 03-Mar-2008 Devang Patel <dpatel@apple.com> s/isReturnStruct()/hasStructRetAttr()/g


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47857 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
8728f1915f332f09112848c6d30055be5b943ba5 02-Mar-2008 Chris Lattner <sabre@nondot.org> Add a new ShuffleVectorInst::getMaskValue method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47813 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
e6be34a53ecbe8c2ff9f0793b13d847e94c0de91 27-Feb-2008 Devang Patel <dpatel@apple.com> Add comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47653 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
53284d39cd9cced68f6f4a8d96cbc3c442c190e3 26-Feb-2008 Devang Patel <dpatel@apple.com> Remove unncessary ReturnInst constructors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47633 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
f4511cd8fbcea9f8eca79b162b3ad3edbd951746 26-Feb-2008 Devang Patel <dpatel@apple.com> Use SmallVector while constructing ReturnInst.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47619 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
fea9830468c316a77f34412004b682e5aacd6a69 26-Feb-2008 Devang Patel <dpatel@apple.com> Avoid const_casts


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47616 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
f8989657a741e36ce8655384e1de10886df3d0b0 26-Feb-2008 Devang Patel <dpatel@apple.com> Remove unnecessary getOperand/setOperand overriders.
Simplify getReturnValue()


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47614 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
814ebd77b015c9e95afa6be74cb7e7a636baa7f4 26-Feb-2008 Devang Patel <dpatel@apple.com> Unify to ReturnInst::init() member functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47611 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
64d4e6125949ebdc31a488c7ed100373b3c99f15 26-Feb-2008 Devang Patel <dpatel@apple.com> Optimize most common case by using single RetVal in ReturnInst.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47607 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
aaeb60ae4028c841bf009173529d91a45f370756 26-Feb-2008 Devang Patel <dpatel@apple.com> Pass const vectors by reference.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
57ef4f46c182cdbe014d469892090ff50c739cf9 23-Feb-2008 Devang Patel <dpatel@apple.com> To support multiple return values, now ret instruction supports multiple operands instead of one aggregate operand.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47508 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
22c3979fcaa7ff19c44253eb9b0b0160dfef0aa4 22-Feb-2008 Dale Johannesen <dalej@apple.com> Split ParameterAttributes.h, putting the complicated
stuff into ParamAttrsList.h. Per feedback from
ParamAttrs changes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
08e78b18b8ef2c939ee95469662c98e23846d860 22-Feb-2008 Dale Johannesen <dalej@apple.com> Pass alignment on ByVal parameters, from FE, all
the way through. It is now used for codegen.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47484 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
dd4d45337b80ce73926e7a9ffc3b668da6d008f0 20-Feb-2008 Devang Patel <dpatel@apple.com> getresult does not support nested aggregates.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47396 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
474869f2b284b8c6361e5c2af41aa76b752ca356 20-Feb-2008 Devang Patel <dpatel@apple.com> getresult type is the type of indexed aggregate element


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47392 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
23755d8755bc0fc6a4e8f4de51d0ed2a760d23d6 20-Feb-2008 Devang Patel <dpatel@apple.com> Specify GetResultInst index as an unsigned.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47390 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
ae9f3a3b7c915f725aef5a7250e88eaeddda03c6 20-Feb-2008 Anton Korobeynikov <asl@math.spbu.ru> Unbreak build with gcc 4.3: provide missed includes and silence most annoying warnings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
40a04216daaaee119665e023019c005306ec48ac 19-Feb-2008 Devang Patel <dpatel@apple.com> Add GetResultInst. First step for multiple return value support.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47348 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
0d51e7ec0d2dcbea9e304fd58deb05f37eb75635 19-Feb-2008 Dale Johannesen <dalej@apple.com> Expand ParameterAttributes to 32 bits (in preparation
for adding alignment info, not there yet). Clean up
interfaces to reference ParameterAttributes consistently.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47342 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
548448a317b39ec8446f3c82f44d01f938b921b2 18-Feb-2008 Duncan Sands <baldrick@free.fr> Simplify caller updating using a CallSite, as
requested by Chris. While there, do the same
for an existing function committed by someone
called "lattner" :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47273 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
4189a538e4ae10e6ed359b07cdcc96fd0822c811 28-Jan-2008 Nick Lewycky <nicholas@mxc.ca> Handle some more combinations of extend and icmp. Fixes PR1940.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46431 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
53d4afcee998f6861ce4056c48c9729c489d7a9a 21-Jan-2008 Duncan Sands <baldrick@free.fr> Be consistent with other attribute methods, and
check the callee also if it is known.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46206 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
15ea48c9ce79518d26e52b37cacee54b0b3b2e64 14-Jan-2008 Duncan Sands <baldrick@free.fr> Simplify CallInst::hasByValArgument using a new method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45974 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
42725e7251a75d4df351a4da93b1b6e2ca449aa6 14-Jan-2008 Evan Cheng <evan.cheng@apple.com> Simplify code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45950 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
f4a5498ab44f06b2b74da7fda92521f34bb22367 12-Jan-2008 Evan Cheng <evan.cheng@apple.com> Add hasByValArgument() to test if a call instruction has byval argument(s).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45913 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
a9d0c9dc58855a5f01dcc5c85c89fd3fc737d3e8 06-Jan-2008 Duncan Sands <baldrick@free.fr> When transforming a call to a bitcast function into
a direct call with cast parameters and cast return
value (if any), instcombine was prepared to cast any
non-void return value into any other, whether castable
or not. Add a new predicate for testing whether casting
is valid, and check it both for the return value and
(as a cleanup) for the parameters.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45657 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
50ee9ddc8f0633af6cb0a5693a2c706e98f944da 03-Jan-2008 Chris Lattner <sabre@nondot.org> Split param attr implementation out from Function.cpp into its
own file. Don't #include ParameterAttributes.h into any major
public header files: just move methods out of line as appropriate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
f897b7d3052c76bb4914a8ca71580bc99a9439fc 03-Jan-2008 Chris Lattner <sabre@nondot.org> remove blob of #if'd out code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45512 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
4ee451de366474b9c228b4e5fa573795a715216d 29-Dec-2007 Chris Lattner <sabre@nondot.org> Remove attribution from file headers, per discussion on llvmdev.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45418 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
f0c3354d998507515ab39e26b5292ea0ceb06aef 19-Dec-2007 Duncan Sands <baldrick@free.fr> When inlining through an 'nounwind' call, mark inlined
calls 'nounwind'. It is important for correct C++
exception handling that nounwind markings do not get
lost, so this transformation is actually needed for
correctness.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45218 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
2b0e8990ab33ec2dad21286d3ce01dbb4bbe63c1 18-Dec-2007 Duncan Sands <baldrick@free.fr> Rename isNoReturn to doesNotReturn, and isNoUnwind to
doesNotThrow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45160 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
43ad6b3e0d6ada51e9b23aab3e061187f1f5710c 17-Dec-2007 Christopher Lamb <christopher.lamb@gmail.com> Change the PointerType api for creating pointer types. The old functionality of PointerType::get() has become PointerType::getUnqual(), which returns a pointer in the generic address space. The new prototype of PointerType::get() requires both a type and an address space.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45082 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
ece2c04d532d46405c085769d03173b392813eb3 16-Dec-2007 Duncan Sands <baldrick@free.fr> Make instcombine promote inline asm calls to 'nounwind'
calls. Remove special casing of inline asm from the
inliner. There is a potential problem: the verifier
rejects invokes of inline asm (not sure why). If an
asm call is not marked "nounwind" in some .ll, and
instcombine is not run, but the inliner is run, then
an illegal module will be created. This is bad but
I'm not sure what the best approach is. I'm tempted
to remove the check in the verifier...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45073 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
fe63fb986dc9510c5d68f2442edab9574e9e50d0 11-Dec-2007 Christopher Lamb <christopher.lamb@gmail.com> Implement address space attribute for LLVM pointer types. Address spaces are
regions of memory that have a target specific relationship, as described in the
Embedded C Technical Report.

This also implements the 2007-12-11-AddressSpaces test,
which demonstrates how address space attributes can be used in LLVM IR.

In addition, this patch changes the bitcode signature for stores (in a backwards
compatible manner), such that the pointer type, rather than the pointee type, is
encoded. This permits type information in the pointer (e.g. address space) to be
preserved for stores.

LangRef updates are forthcoming.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44858 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
afba8fe662d65b25b4baf46bb26cc18e1f9cc0a5 10-Dec-2007 Gordon Henriksen <gordonhenriksen@mac.com> Reverting dtor devirtualization patch.
_sabre_: it has a major problem: by the time ~Value is run, all of the "parts" of the derived classes have been destroyed
_sabre_: the vtable lives to fight another day

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44760 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
ed455c8fa25dd37a13b33f0afa66be03ac49b5bb 09-Dec-2007 Gordon Henriksen <gordonhenriksen@mac.com> Devirtualizing Value destructor (PR889). Patch by Pawel Kunio!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44747 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
a3355ffb3d30d19d226bbb75707991c60f236e37 03-Dec-2007 Duncan Sands <baldrick@free.fr> Rather than having special rules like "intrinsics cannot
throw exceptions", just mark intrinsics with the nounwind
attribute. Likewise, mark intrinsics as readnone/readonly
and get rid of special aliasing logic (which didn't use
anything more than this anyway).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44544 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
fd8890dbee577fbf20798ccf1709a62e2b46f182 29-Nov-2007 Duncan Sands <baldrick@free.fr> Small parameter attributes cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44433 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
afa3b6da11bc05281bcf09e45de9e037e0ee5011 28-Nov-2007 Duncan Sands <baldrick@free.fr> Add some convenience methods for querying attributes, and
use them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44403 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
dc024674ff96820d6020757b48d47f46d4c07db2 27-Nov-2007 Duncan Sands <baldrick@free.fr> Fix PR1146: parameter attributes are longer part of
the function type, instead they belong to functions
and function calls. This is an updated and slightly
corrected version of Reid Spencer's original patch.
The only known problem is that auto-upgrading of
bitcode files doesn't seem to work properly (see
test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully
a bitcode guru (who might that be? :) ) will fix it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44359 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
b348d18caf834bc26a80e60aa7a2c9b1748734e8 17-Nov-2007 Nate Begeman <natebegeman@mac.com> Add support for vectors to int <-> float casts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44204 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
53336cb47ee481ef3733958d2bf38ee1dcc381c7 18-Oct-2007 Chris Lattner <sabre@nondot.org> fix typo


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43129 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
b8f74793b9d161bc666fe27fc92fe112b6ec169b 04-Sep-2007 David Greene <greened@obbligato.org> Update GEP constructors to use an iterator interface to fix
GLIBCXX_DEBUG issues.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41697 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
f1355a55f8d815f5385e9a4432195f03b65f3a42 27-Aug-2007 David Greene <greened@obbligato.org> Update InvokeInst to work like CallInst


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41506 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
cd406fe1236a1e0a7f210676768ddd3f69e23166 24-Aug-2007 Chris Lattner <sabre@nondot.org> sink clone() down the class hierarchy from CmpInst into ICmpInst/FCmpInst.
This eliminates a conditional on that path, and ensures ICmpInst/FCmpInst
both have an out-of-line virtual method to home the class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41371 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
52eec548206d0b135b55ba52dd0e82e978f15ae5 01-Aug-2007 David Greene <greened@obbligato.org> New CallInst interface to address GLIBCXX_DEBUG errors caused by
indexing an empty std::vector.

Updates to all clients.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40660 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
6ab2d18f5ea44bf740964036e08253b75ab601f9 18-Jul-2007 Dan Gohman <gohman@apple.com> Add constructor overloads for LoadInst and StoreInst that insert at the
end of a BasicBlock and have an alignment parameter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
e20b7bec0234bad3986ff68961ebcbdaffb178ec 15-Jun-2007 Chris Lattner <sabre@nondot.org> Enhance BinaryOperator::isNot to support vector not.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37585 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
86296cca6326489ca34bbe88694966bf84d262bd 11-May-2007 Dan Gohman <gohman@apple.com> Update comments to say "vector" instead of "packed".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36995 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
6b0974cd1d5ab238e8777ede08acaad06e6b5ffa 27-Apr-2007 Chris Lattner <sabre@nondot.org> add a GEP helper function


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36515 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
43c7f37942a35398fd1e14b22f435f483a0ee863 22-Apr-2007 Christopher Lamb <christopher.lamb@gmail.com> PR400 work phase 1. Add attributed load/store instructions for volatile/align to LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36349 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
b90909e40536db17665727f5ca1c618e485464c3 22-Apr-2007 Reid Spencer <rspencer@reidspencer.com> For PR1136:
Add reference counting to ParamAttrsList and make use of it in Function,
CallInst and InvokeInst classes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
4f859aa532dbf061736f9c23e0d0882b5cdfe566 22-Apr-2007 Reid Spencer <rspencer@reidspencer.com> For PR1146:
Make ParamAttrsList objects unique. You can no longer directly create or
destroy them but instead must go through the ParamAttrsList::get()
interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36327 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
c67bdc288aac130d88630f7fa95ceca6bcf95077 21-Apr-2007 Reid Spencer <rspencer@reidspencer.com> Revert Christopher Lamb's load/store alignment changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36309 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
2330e4d4c4f8008d17f5a38ac0d7b04e139d4131 21-Apr-2007 Christopher Lamb <christopher.lamb@gmail.com> add support for alignment attributes on load/store instructions


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36301 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
6f771d435111cd943414ab570e9aec0c7a6c2954 14-Apr-2007 Chris Lattner <sabre@nondot.org> add GetElementPtrInst::hasAllZeroIndices, a long-overdue helper method.
Writing it twice in the same day was too much for me.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35978 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
97c0e2107be9490333866c223250ece92c47630f 11-Apr-2007 Reid Spencer <rspencer@reidspencer.com> Fix a bug where ICmpInst objects instantiated directly with a name would
not retain that name. Not noticed because AsmParser always sets name after
construction. However, llvm2cpp noticed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35903 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
fa3e91242fada931ccb96468ac4c93ca151d64dc 09-Apr-2007 Reid Spencer <rspencer@reidspencer.com> For PR1146:
* Add ParamAttrs to InvokeInst class too.
* Make sure all initializes of ParamAttrs in CallInst and InvokeInst are 0
* Destruct the ParamAttrs in Call/Invoke destructors to avoid memory
leaks. This will change when ParamAttrsList is uniquified but needs to
be correct until then.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35824 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
4746ecf16eeb5ff920672fdff1c0dd85594437ed 09-Apr-2007 Reid Spencer <rspencer@reidspencer.com> For PR1146:
* Add ParamAttrList pointers to Function and CallInst.
* Move the implementation of ParamAttrList from Type.cpp to Function.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35818 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
ecb7a77885b174cf4d001a9b48533b3979e7810d 22-Mar-2007 Dan Gohman <gohman@apple.com> Change uses of Function::front to Function::getEntryBlock for readability.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35265 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
bb9723bd980753702527ad037a700fd9a4c9f247 01-Mar-2007 Reid Spencer <rspencer@reidspencer.com> Use modern variable name. ConstantUnsignedInt is long since dead. No
functional change with this patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34806 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
3da43849f2a2319ded6ed379ec8e7d620d6ac8c6 28-Feb-2007 Reid Spencer <rspencer@reidspencer.com> Provide an ICmpInst::makeConstantRange to generate a ConstantRange value
from a predicate and an APInt. This is removed from ConstantRange class
so that ConstantRange doesn't have to depend on lib/VMCore.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34760 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
910c80a07503591052a77cefb26cebea95a8d743 24-Feb-2007 Chris Lattner <sabre@nondot.org> Refactor the setName stuff, moving it down the inheritance hierarchy, to
solve a crash in -instcombine -debug that was hit while investigating PR1217


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34544 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
ac9dcb94dde5f166ee29372385c0e3b695227ab4 15-Feb-2007 Reid Spencer <rspencer@reidspencer.com> For PR1195:
Change use of "packed" term to "vector" in comments, strings, variable
names, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34300 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
9d6565a5b1fbc4286d6ee638d8f47a3171a9ed7e 15-Feb-2007 Reid Spencer <rspencer@reidspencer.com> For PR1195:
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34293 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
f00042a9990d90885a8f236ed0f6bf07902d1374 13-Feb-2007 Chris Lattner <sabre@nondot.org> Switch UnaryOperators to default to passing names up by const char* when possible.
This speeds up bcreading by 1.5%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34233 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
133bab0606719cf3e8f5c44873cf205f58a181b5 13-Feb-2007 Chris Lattner <sabre@nondot.org> eliminate instruction ctors that take vectors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34228 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
d2dd1508aa1218ab1cb34abb8b73ed531847df5a 13-Feb-2007 Chris Lattner <sabre@nondot.org> Add invokeinst and callinst ctors that don't take vectors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34214 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
d54f432006283ce5ff5626799eb2d7937542b3e8 13-Feb-2007 Chris Lattner <sabre@nondot.org> remove some dead methods.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34213 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
832254e1c2387c0cbeb0a820b8315fbe85cb003a 02-Feb-2007 Reid Spencer <rspencer@reidspencer.com> Changes to support making the shift instructions be true BinaryOperators.
This feature is needed in order to support shifts of more than 255 bits
on large integer types. This changes the syntax for llvm assembly to
make shl, ashr and lshr instructions look like a binary operator:
shl i32 %X, 1
instead of
shl i32 %X, i8 1
Additionally, this should help a few passes perform additional optimizations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33776 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
2e21fce987d9880803d2e6bbd625496cb0e97ae9 01-Feb-2007 Chris Lattner <sabre@nondot.org> silence some warnings when assertions are disabled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33747 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
92905d95a0cc0be3c191552206bc8ad3c139b110 31-Jan-2007 Reid Spencer <rspencer@reidspencer.com> Fix build breakage by using correct arguments to getIndexedType in the
GEP constructors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33726 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
6ffbe17b3c7934dd97bbbd97c77526727b7ac5d7 31-Jan-2007 Chris Lattner <sabre@nondot.org> implement the new GEP instruction ctors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33708 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
2b9a5daf7c4dc39b46662a69e95e610e7b2cd4ba 31-Jan-2007 Chris Lattner <sabre@nondot.org> Revise APIs for creating constantexpr GEPs to not require the use of vectors.
This allows us to eliminate many temporary vectors, and theirassociated malloc/free pairs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33692 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
ca01cfe4df705e57bf0c8992b2d907c63626a5be 26-Jan-2007 Reid Spencer <rspencer@reidspencer.com> Fix an assertion message.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33519 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
24d6da5fedcf39891f7d8c5b031c01324b3db545 21-Jan-2007 Reid Spencer <rspencer@reidspencer.com> For PR970:
Clean up handling of isFloatingPoint() and dealing with PackedType.
Patch by Gordon Henriksen!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33415 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
0a11af1f73916b53cd4eb4ebac37527facd9cf3b 17-Jan-2007 Reid Spencer <rspencer@reidspencer.com> For PR1117:
Expose the previously hidden checkCast function as CastInst::castIsValid.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33282 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
42a75517250017a52afb03a0ade03cbd49559fe5 15-Jan-2007 Chris Lattner <sabre@nondot.org> rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.
rename Type::getIntegralTypeMask to Type::getIntegerTypeMask.

This makes naming much more consistent. For example, there are now no longer any
instances of IntegerType that are not considered isInteger! :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33225 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
b9d8b97f4a1c15d16bedef1f8796f03f0df843e7 15-Jan-2007 Chris Lattner <sabre@nondot.org> teach VMCore to accept i1 add's and shifts


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
a54b7cbd452b3adb2f51346140d996b29c2cdb30 12-Jan-2007 Reid Spencer <rspencer@reidspencer.com> For PR1064:
Implement the arbitrary bit-width integer feature. The feature allows
integers of any bitwidth (up to 64) to be defined instead of just 1, 8,
16, 32, and 64 bit integers.

This change does several things:
1. Introduces a new Derived Type, IntegerType, to represent the number of
bits in an integer. The Type classes SubclassData field is used to
store the number of bits. This allows 2^23 bits in an integer type.
2. Removes the five integer Type::TypeID values for the 1, 8, 16, 32 and
64-bit integers. These are replaced with just IntegerType which is not
a primitive any more.
3. Adjust the rest of LLVM to account for this change.

Note that while this incremental change lays the foundation for arbitrary
bit-width integers, LLVM has not yet been converted to actually deal with
them in any significant way. Most optimization passes, for example, will
still only deal with the byte-width integer types. Future increments
will rectify this situation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33113 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
4fe16d607d11e29d742208894909733f5ad01f8f 11-Jan-2007 Reid Spencer <rspencer@reidspencer.com> Rename BoolTy as Int1Ty. Patch by Sheng Zhou.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33076 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
6b6b6ef1677fa71b1072c2911b4c1f9524a558c9 11-Jan-2007 Zhou Sheng <zhousheng00@gmail.com> For PR1043:
Merge ConstantIntegral and ConstantBool into ConstantInt.
Remove ConstantIntegral and ConstantBool from LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33073 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
79e21d338c60b4b5a5746fc45e37ea0310606aee 31-Dec-2006 Reid Spencer <rspencer@reidspencer.com> For PR950:
Change signed integer type names to unsigned equivalents.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32780 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
e4d87aa2de6e52952dca73716386db09aad5a8fd 23-Dec-2006 Reid Spencer <rspencer@reidspencer.com> For PR950:
This patch removes the SetCC instructions and replaces them with the ICmp
and FCmp instructions. The SetCondInst instruction has been removed and
been replaced with ICmpInst and FCmpInst.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32751 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
1bd82a5c65623f88ee4b2ce5e549a4fe11baeee3 18-Dec-2006 Reid Spencer <rspencer@reidspencer.com> Remove the createInferredCast methods now that their last uses have been
removed. All casting is now explicit and not inferred by VMCore.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32655 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
6d81a7d2aefd769267efe40e5a78f9427039e8b0 12-Dec-2006 Reid Spencer <rspencer@reidspencer.com> Implement createIntegerCast and createFPCast factory methods for handling
integer and floating point cast creation. createIntegerCast generates
ZExt/SExt, BitCast or Trunc. createFPCast generates FPExt, Bitcast, or
FPTrunc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32456 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
6b538cfc5c758edc8e05070ab8794bd6c3e8ffb9 07-Dec-2006 Reid Spencer <rspencer@reidspencer.com> Provide a getOpcode() method on CmpInst to ensure the opcode is returned
as the right type. Use this to shorten some code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32300 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
518f6fa310df08a8e205adda62b145d50971a38f 06-Dec-2006 Chris Lattner <sabre@nondot.org> Fix Transforms/InstCombine/2006-12-05-fp-to-int-ext.ll, fixing an out-of-
stack-space issue in the ppc bootstrap.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32244 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
330d86d7489a961d452e821a34dc6de3f19ae73a 05-Dec-2006 Reid Spencer <rspencer@reidspencer.com> Implement createPointerCast.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32212 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
848414e49c7600e3002a4366de52d03a9638b327 04-Dec-2006 Reid Spencer <rspencer@reidspencer.com> Implement new cast creation functions for both instructions and constant
expressions. These will get used to reduce clutter as we replace various
calls to createInferredCast and getCast.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32191 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
56667123b7f6d6dda8b4dc178c8be4192299ae6e 04-Dec-2006 Reid Spencer <rspencer@reidspencer.com> Take a baby step towards getting rid of inferred casts. Provide methods on
CastInst and ConstantExpr that allow the signedness to be explicitly passed
in and reliance on signedness removed from getCastOpcode. These are
temporary measures useful during the conversion of inferred casts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32164 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
97af751deb9b26fd42fbcee082da9ccc4ded5b45 02-Dec-2006 Jeff Cohen <jeffc@jolt-lang.org> Unbreak VC++ build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32113 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
3da59db637a887474c1b1346c1f3ccf53b6c4663 27-Nov-2006 Reid Spencer <rspencer@reidspencer.com> For PR950:
The long awaited CAST patch. This introduces 12 new instructions into LLVM
to replace the cast instruction. Corresponding changes throughout LLVM are
provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the
exception of 175.vpr which fails only on a slight floating point output
difference.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31931 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
45fb3f3cb2b8efc01d9bbe42a64194f35b92c759 20-Nov-2006 Reid Spencer <rspencer@reidspencer.com> For PR950:
First in a series of patches to convert SetCondInst into ICmpInst and
FCmpInst using only two opcodes and having the instructions contain their
predicate value. Nothing uses these classes yet. More patches to follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
3822ff5c71478c7c90a50ca57045fb676fcb5005 08-Nov-2006 Reid Spencer <rspencer@reidspencer.com> For PR950:
This patch converts the old SHR instruction into two instructions,
AShr (Arithmetic) and LShr (Logical). The Shr instructions now are not
dependent on the sign of their operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31542 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
0a783f783ca05c961234385f5b269d4cf03dbbdb 02-Nov-2006 Reid Spencer <rspencer@reidspencer.com> For PR950:
Replace the REM instruction with UREM, SREM and FREM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31369 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
1628cec4d7fce310d9cde0bcc73997e5a71692c4 26-Oct-2006 Reid Spencer <rspencer@reidspencer.com> For PR950:
Make necessary changes to support DIV -> [SUF]Div. This changes llvm to
have three division instructions: signed, unsigned, floating point. The
bytecode and assembler are bacwards compatible, however.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31195 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
b83eb6447ba155342598f0fabe1f08f5baa9164a 20-Oct-2006 Reid Spencer <rspencer@reidspencer.com> For PR950:
This patch implements the first increment for the Signless Types feature.
All changes pertain to removing the ConstantSInt and ConstantUInt classes
in favor of just using ConstantInt.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31063 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
06a248c2385b997932689ed1312a1a6b1d814c3c 05-Oct-2006 Chris Lattner <sabre@nondot.org> Add insertelement/extractelement helper ctors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30750 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
79bc332ddb5200d61fb3739502cb0e8b8bb850bf 18-Sep-2006 Chris Lattner <sabre@nondot.org> add a helper method


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
2f463865c2f03b8835e35d3499fcd95eed922bc6 17-Sep-2006 Chris Lattner <sabre@nondot.org> Add ShiftInst::isLogical/ArithmeticShift methods.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30445 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
70aa33ee37fede7fb84de02daa38557ffd366458 21-Jun-2006 Chris Lattner <sabre@nondot.org> Add some out-of-line virtual dtors so that the class has a "home", preventing
vtables for (e.g.) Instruction from being emitted into every .o file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28898 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
ff8953ae6d417fb28b8eb2a5a212cb34eafa0e42 14-May-2006 Chris Lattner <sabre@nondot.org> remove dead var


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28287 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
e46749cce0088a0aaa03bcb5786e94c6c11bced5 10-May-2006 Chris Lattner <sabre@nondot.org> Add an assertion for a common error


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
9b4c96d45dfeda453709478286bcc5e6b784aca4 03-May-2006 Chris Lattner <sabre@nondot.org> Add assertions that verify that the actual arguments to a call or invoke match
the prototype of the called function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28070 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
f95670f6fc29c0b103428265a8c594d6b8871083 15-Apr-2006 Chris Lattner <sabre@nondot.org> Move these ctors out of line


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27713 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
d2325d0a7325972a7caf01df5a3593615542aa5f 08-Apr-2006 Chris Lattner <sabre@nondot.org> Add methods to check insertelement/extractelement instructions for validity,
check validity when instructions are created.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27523 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
00f1023cf8b30c74dc219525f518a80c45b6e7ba 08-Apr-2006 Chris Lattner <sabre@nondot.org> Add shufflevector support, todo, implement better constant folding.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27510 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
fdbc82a925d3b5180bab13863584edd342c830a4 25-Mar-2006 Chris Lattner <sabre@nondot.org> Teach BinaryOperator::createNot to work with packed integer types


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27124 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
c152f9cd26e7cb32352c513389a18ffd892ecaec 17-Jan-2006 Robert Bocchino <bocchino@illinois.edu> VMCore support for the insertelement operation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25408 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
b52ee7f5ffd189c4f21ab227c6a24061ef3378fc 10-Jan-2006 Robert Bocchino <bocchino@illinois.edu> Added support for the extractelement operation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25181 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
b9d4100f327647debd0936fe403cdef00ab56859 21-Dec-2005 Chris Lattner <sabre@nondot.org> Get logical operations to like packed types, allow BinOp::getNot to create
the right vector of -1's as its operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24906 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
6033716140c18887174d3371ef7c9a840e001a24 05-Nov-2005 Chris Lattner <sabre@nondot.org> verify that alignments are always a power of 2


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24200 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
14b0529532904b9e5a1e34526b4a3209f3e5bc62 05-Nov-2005 Nate Begeman <natebegeman@mac.com> Add support alignment of allocation instructions.
Add support for specifying alignment and size of setjmp jmpbufs.

No targets currently do anything with this information, nor is it presrved
in the bytecode representation. That's coming up next.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24196 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
d7231ac523eb8d5c6a6b09e223e957cb99f9d446 05-Aug-2005 Chris Lattner <sabre@nondot.org> PHINode::hasConstantValue should never return the PHI itself, even if the
PHI is its only operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22676 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
8313a25d27ceb47759b64aa9a48b5cb04aaf9e6f 05-Aug-2005 Chris Lattner <sabre@nondot.org> Invoke instructions do not dominate all successors


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22671 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
b3b48e11dad271bd236aaec1a601f4a02bfb5374 05-Aug-2005 Chris Lattner <sabre@nondot.org> Use the bool argument to hasConstantValue to decide whether the client is
prepared to deal with return values that do not dominate the PHI. If we
cannot prove that the result dominates the PHI node, do not return it if
the client can't cope.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22669 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
9acbd611ec13fabf3c13f20161c0de576ea1ad60 05-Aug-2005 Chris Lattner <sabre@nondot.org> Mark hasConstantValue as a const method


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
c523f4c09647bfa17c3d209cf8333522bc3c069d 05-Aug-2005 Nate Begeman <natebegeman@mac.com> Add an extra parameter that Chris requested


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22665 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
a83ba0f5c934e2cdbb5724cab365ecc0b5aae6c6 05-Aug-2005 Nate Begeman <natebegeman@mac.com> Fix a fixme in CondPropagate.cpp by moving a PhiNode optimization into
BasicBlock's removePredecessor routine. This requires shuffling around
the definition and implementation of hasContantValue from Utils.h,cpp into
Instructions.h,cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22664 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
558bc88a00930fce283b240b7c9555f649a18f1b 18-Jun-2005 Andrew Lenharth <andrewl@lenharth.org> core changes for varargs


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22254 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
d511898b581826694e6c651e23343b1e1ba5ba64 06-May-2005 Chris Lattner <sabre@nondot.org> add support for explicit calling conventions


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21746 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
ddb6db4fa11d06217d01d8431596131abdfb7ef0 06-May-2005 Chris Lattner <sabre@nondot.org> Add a 'tail' marker for call instructions, patch contributed by
Alexander Friedman.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
f818cfe0969d74ca356f87947b651230fdad6ed0 03-May-2005 Chris Lattner <sabre@nondot.org> fix a bug in the 1 index GEP handling code


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21670 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
38bacf29e8716d1ca2f10c6e92fe7a12f358502c 03-May-2005 Chris Lattner <sabre@nondot.org> add direct support for making GEP instrs with one index


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21665 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
64001d0a138cfff860a50aaa42f215028ca68be6 24-Apr-2005 Chris Lattner <sabre@nondot.org> Allow these methods to take a generic Value* to simplify clients. Use
const_cast instead of c casts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21493 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
fd93908ae8b9684fe71c239e3c6cfe13ff6a2663 22-Apr-2005 Misha Brukman <brukman+llvm@gmail.com> Remove trailing whitespace


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21427 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
fd678243862d499e6a4d980ea6a75ce2d0c3a9c5 16-Mar-2005 Misha Brukman <brukman+llvm@gmail.com> Convert tabs to spaces


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
d1a326006df65470217b9f2f23a4cee2a9696646 24-Feb-2005 Chris Lattner <sabre@nondot.org> switch instructions only allow constantints for their values, be more specific.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
286629736f7453fe0cdf9517e4b141c7086a2e77 05-Feb-2005 Chris Lattner <sabre@nondot.org> Instead of initializing the volatile field, use accessors to set it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20045 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
1f377fcaadb6fc5914759d84ad68eb9297510bf2 29-Jan-2005 Chris Lattner <sabre@nondot.org> Make sure that we always grow a multiple of 2 operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19902 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
b12261ac698bf9c8dd118bb94d87aae266dac98a 29-Jan-2005 Chris Lattner <sabre@nondot.org> Merge InstrTypes.cpp into this file
Adjust to changes in the User class, operand handling is very different.
PHI node and switch statements must handle explicit resizing of operand
lists.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19891 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
1bae291cb9cafc8a8c86538449b78a575ed9834a 27-Jan-2005 Misha Brukman <brukman+llvm@gmail.com> Fix grammar


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19854 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
18e6c22f05f1b5cfa89bdeed8b407afb9255a6b0 18-Nov-2004 Chris Lattner <sabre@nondot.org> These methods are inlined


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
859804f529d73120a4414c43cae5fc546453a37f 17-Nov-2004 Alkis Evlogimenos <alkis@evlogimenos.com> Make ReturnInst accept a value of type void as the return value. The
ReturnInst constructed is the same as if NULL was passed instead of
the void value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17923 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
b976e668165e1875a8f1eb7af800e33bb1e4393d 16-Oct-2004 Chris Lattner <sabre@nondot.org> Add support for undef and unreachable


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17041 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
795948a5d1f47c121a027a7916b323caa433f2cb 16-Oct-2004 Chris Lattner <sabre@nondot.org> Move the implementation of the instructions clone methods to this file so
that the vtables for these classes are only instantiated in this translation
unit, not in every xlation unit they are used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17026 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
715c90ba524e736190a6380695ab337eeb5148be 20-Aug-2004 Brian Gaeke <gaeke@uiuc.edu> Packed types, brought to you by Brad Jones


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15938 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
8fabb621b15a5338304bc87b056d1e2048087c3e 06-Aug-2004 Alkis Evlogimenos <alkis@evlogimenos.com> Split assertion to two in order to give better assertion messages.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15543 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp
91366a85413285d15cbe462591f1ceef2ea1f6d7 29-Jul-2004 Alkis Evlogimenos <alkis@evlogimenos.com> Merge i*.cpp definitions into Instructions.cpp as part of bug403.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15326 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/VMCore/Instructions.cpp