1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 21:42:54 +02:00
Commit Graph

177 Commits

Author SHA1 Message Date
Daniel Dunbar
aeb8abb0e0 Revert r112091, "Remap metadata attached to instructions when remapping
individual ...", which depends on r111922, which I am reverting.

llvm-svn: 112157
2010-08-26 03:48:08 +00:00
Dan Gohman
d19a0a49d1 Remap metadata attached to instructions when remapping individual
instructions, not when remapping modules.

llvm-svn: 112091
2010-08-25 21:36:50 +00:00
Dan Gohman
30fd721e48 Use MapValue in the Linker instead of having a private function
which does the same thing. This eliminates redundant code and
handles MDNodes better. MDNode linking still doesn't fully
work yet though.

llvm-svn: 111941
2010-08-24 18:50:07 +00:00
Dan Gohman
5cbd5888e7 MapValue support for MDNodes. This is similar to r109117, except
that it avoids a lot of unnecessary cloning by avoiding remapping
MDNode cycles when none of the nodes in the cycle actually need to
be remapped. Also it uses the new temporary MDNode mechanism.

llvm-svn: 111922
2010-08-24 17:10:10 +00:00
Nick Lewycky
8cbc57da86 Revert this because we can't clone cyclic MDNodes which are creating during a
build of llvm-gcc.

llvm-svn: 109355
2010-07-24 20:54:02 +00:00
Nick Lewycky
7094bd27bc Whether function-local or not, a MDNode may reference a Function in which case
it needs to be mapped to refer to the function in the new module, not the old
one. Fixes PR7700.

llvm-svn: 109353
2010-07-24 19:43:25 +00:00
Devang Patel
f53de95e64 Speculatively revert 109117
llvm-svn: 109132
2010-07-22 18:44:00 +00:00
Devang Patel
58b7143697 Map MDNode correctly.
A non function local MDNode can have an operand which is cloned by MapValue(). 

llvm-svn: 109117
2010-07-22 16:35:00 +00:00
Devang Patel
1c47157b66 MDString is already checked earlier.
llvm-svn: 107516
2010-07-02 21:13:23 +00:00
Devang Patel
373b10cbaa Cosmetic change.
Do not use "ValueMap" as a name for a local variable or an argument.

llvm-svn: 106698
2010-06-23 23:55:51 +00:00
Devang Patel
1967a51efc Revert 106592 for now. It causes clang-selfhost build failure.
llvm-svn: 106598
2010-06-22 23:29:55 +00:00
Devang Patel
a24bf5907c If a metadata operand is seeded in value map and the metadata should also be seeded in value map. This is not limited to function local metadata.
Failure to seed metdata in such cases causes troubles when in a cloned module, metadata from a new module refers to values in old module. Usually this results in mysterious bugpoint crashes. For example,

 Checking to see if we can delete global inits: Unknown constant!
 UNREACHABLE executed at /d/g/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:904!

llvm-svn: 106592
2010-06-22 22:53:21 +00:00
Devang Patel
981ff4464c Revert 106528. It is causing self host failures.
llvm-svn: 106529
2010-06-22 06:14:09 +00:00
Devang Patel
d5696fa05b Do not rely on DenseMap slot which can be easily invalidated when DenseMap grows.
llvm-svn: 106528
2010-06-22 05:16:56 +00:00
Devang Patel
ef601352ff Rename ValueMapTy as ValueToValueMapTy to clearly indicate that this has no replationship with ADT/ValueMap.
llvm-svn: 101950
2010-04-20 22:24:18 +00:00
Devang Patel
788913a131 There is no need to install ValueMapper.h header.
llvm-svn: 101949
2010-04-20 22:18:31 +00:00
Victor Hernandez
4e7937f77b Avoid extra calls to MD->getNumOperands()
llvm-svn: 94618
2010-01-26 23:29:09 +00:00
Chris Lattner
642049e127 It turns out that this #include is needed because otherwise
ValueMapper.cpp ends up calling an out of line 
__ZNK4llvm12PATypeHolder3getEv, which is a template and llvm-config
determines arbitrarily to use the one in libipo.  This sucks, but
keeping the #include is a reasonable workaround.

llvm-svn: 94103
2010-01-21 21:29:25 +00:00
Chris Lattner
3547371b0b unbreak the build, apparently without this transformutils starts depending on libipa?
llvm-svn: 94102
2010-01-21 21:20:51 +00:00
Chris Lattner
3f91babac8 tidy up
llvm-svn: 94101
2010-01-21 21:05:54 +00:00
Victor Hernandez
507d86fcbb Don't need to include IntrinsicInst.h any more
llvm-svn: 94092
2010-01-21 19:33:59 +00:00
Victor Hernandez
3a31114cf9 No need to map NULL operands of metadata
llvm-svn: 94091
2010-01-21 19:26:20 +00:00
Victor Hernandez
50e7dcdcc2 Switch Elts from vector to SmallVector
llvm-svn: 93989
2010-01-20 06:56:16 +00:00
Victor Hernandez
d79e7e0e12 Map operands of all function-local metadata, not just metadata passed to llvm.dbg.declare intrinsics
llvm-svn: 93979
2010-01-20 05:49:59 +00:00
Devang Patel
2cae5754c6 While mapping llvm.dbg.declare intrinsic manually map its operand, if possible,
because it points to an alloca instruction through metadata.

llvm-svn: 93757
2010-01-18 19:52:14 +00:00
Chris Lattner
2bbe57b2b8 Revert 85678/85680. The decision is to stay with the current form of
indirectbr, thus we don't need "blockaddr(@func, null)".  Eliminate it
for simplicity.

llvm-svn: 85699
2009-11-01 01:27:45 +00:00
Chris Lattner
48de74645e adjust a couple xforms to work with null bb's in BlockAddress.
llvm-svn: 85680
2009-10-31 20:13:24 +00:00
Chris Lattner
a0e35cae82 teach various passes about blockaddress. We no longer
crash on any clang tests.

llvm-svn: 85465
2009-10-29 01:21:20 +00:00
Chris Lattner
0a782eec94 teach ValueMapper about BlockAddress', making bugpoint a lot more useful.
llvm-svn: 85458
2009-10-29 00:31:02 +00:00
Chris Lattner
8f70e602d3 unindent massive blocks, no functionality change.
llvm-svn: 85457
2009-10-29 00:28:30 +00:00
Dan Gohman
07044648b2 MapValue doesn't needs its LLVMContext argument.
llvm-svn: 85020
2009-10-24 23:37:16 +00:00
Devang Patel
cb23671431 Rename MDNode.h header. It defines MDnode and other metadata classes.
New name is Metadata.h.

llvm-svn: 77370
2009-07-28 21:49:47 +00:00
Owen Anderson
390e9778d4 Return ConstantVector to 2.5 API.
llvm-svn: 77366
2009-07-28 21:19:26 +00:00
Owen Anderson
aa8c94b051 Change ConstantArray to 2.5 API.
llvm-svn: 77347
2009-07-28 18:32:17 +00:00
Owen Anderson
d729f993b8 Move ConstantStruct back to 2.5 API.
llvm-svn: 77266
2009-07-27 22:29:26 +00:00
Devang Patel
dfa0528df7 Do not seed mstadata into the value map.
llvm-svn: 77208
2009-07-27 17:17:04 +00:00
Owen Anderson
cc287b28c9 Get rid of the Pass+Context magic.
llvm-svn: 76702
2009-07-22 00:24:57 +00:00
Torok Edwin
f955a6ef49 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").

llvm-svn: 75640
2009-07-14 16:55:14 +00:00
Torok Edwin
ae8a3ff177 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.

llvm-svn: 75379
2009-07-11 20:10:48 +00:00
Owen Anderson
121f736d9c "LLVMContext* " --> "LLVMContext *"
llvm-svn: 74878
2009-07-06 23:00:19 +00:00
Owen Anderson
977aa11bc6 More LLVMContext-ification.
llvm-svn: 74807
2009-07-05 22:41:43 +00:00
Nick Lewycky
a9de2f1c81 Give embedded metadata its own type instead of relying on EmptyStructTy.
llvm-svn: 72610
2009-05-30 05:06:04 +00:00
Gabor Greif
d931decf37 rewrite operand loops to use iterators
llvm-svn: 51789
2008-05-30 21:24:22 +00:00
Chris Lattner
ad9a6ccb83 Remove attribution from file headers, per discussion on llvmdev.
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Anton Korobeynikov
369f4381ea Forget to commit users part of value mapper interface
llvm-svn: 43940
2007-11-09 12:27:04 +00:00
Dan Gohman
0ba554c0c8 Fix comments about vectors to use the current wording.
llvm-svn: 39921
2007-07-16 14:29:03 +00:00
Chris Lattner
6334a918d8 fix an obscure and tricky bug the inliner can hit sometimes.
llvm-svn: 34531
2007-02-23 19:54:30 +00:00
Reid Spencer
55e4e98a2a For PR1195:
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.

llvm-svn: 34293
2007-02-15 02:26:10 +00:00
Chris Lattner
71fe09f397 Switch inliner over to use DenseMap instead of std::map for ValueMap. This
speeds up the inliner 16%.

llvm-svn: 33801
2007-02-03 00:08:31 +00:00
Zhou Sheng
23d24526b2 For PR1043:
Merge ConstantIntegral and ConstantBool into ConstantInt.
Remove ConstantIntegral and ConstantBool from LLVM.

llvm-svn: 33073
2007-01-11 12:24:14 +00:00
Chris Lattner
3a664f7dc0 eliminate some ugly code, using ConstantExpr::getWithOperands instead.
llvm-svn: 29149
2006-07-14 22:21:31 +00:00
Chris Lattner
12c9d54f79 Implement a new method, CloneAndPruneFunctionInto, as documented.
llvm-svn: 28519
2006-05-27 01:22:24 +00:00
Chris Lattner
a0a718c0cc Add supprot for shufflevector
llvm-svn: 27513
2006-04-08 01:19:12 +00:00
Chris Lattner
32b65613d9 Fix inlining of insert/extract element constantexprs
llvm-svn: 27478
2006-04-07 04:41:03 +00:00
Chris Lattner
704770bfe7 add valuemapper support for inline asm
llvm-svn: 27332
2006-04-01 23:17:11 +00:00
Chris Lattner
dc5d97a341 teach the inliner to work with packed constants
llvm-svn: 27161
2006-03-27 05:50:18 +00:00
Chris Lattner
66f10c8957 teach the cloner to handle inline asms
llvm-svn: 25633
2006-01-26 01:55:22 +00:00
Misha Brukman
53e199440e Remove trailing whitespace
llvm-svn: 21427
2005-04-21 23:48:37 +00:00
Chris Lattner
4fca8caaee Add support for UndefValue
llvm-svn: 17046
2004-10-16 18:10:31 +00:00
Chris Lattner
7abc1c2473 Add value mapper support for select constant exprs. This should fix a bug
Nate ran into when bugpointing siod.  This fix should go into LLVM 1.3

llvm-svn: 15712
2004-08-13 02:43:19 +00:00
Alkis Evlogimenos
f853362a44 Stop using getValues().
llvm-svn: 15487
2004-08-04 08:44:43 +00:00
Reid Spencer
7b03169e0e Remove an if statement that would never be reached.
llvm-svn: 14968
2004-07-18 08:41:47 +00:00
Reid Spencer
7f33869f9b bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage

llvm-svn: 14953
2004-07-18 00:44:37 +00:00
Chris Lattner
2db1894038 Progress on PR341
llvm-svn: 14840
2004-07-15 02:06:12 +00:00
Reid Spencer
50ec3f9325 Add #include <iostream> since Value.h does not #include it any more.
llvm-svn: 14622
2004-07-04 12:19:56 +00:00
Brian Gaeke
9adf9d8bfc Move RemapInstruction() to ValueMapper, so that it can be shared with
CloneTrace, and because it is primarily an operation on ValueMaps.  It
is now a global (non-static) function which can be pulled in using
ValueMapper.h.

llvm-svn: 13600
2004-05-19 09:08:12 +00:00
Chris Lattner
28131460da Adjustments to support the new ConstantAggregateZero class
llvm-svn: 11474
2004-02-15 05:55:15 +00:00
Chris Lattner
47e9056669 Remove use of ConstantExpr::getShift
llvm-svn: 10792
2004-01-12 19:10:58 +00:00
Chris Lattner
031bd7e9f3 Finegrainify namespacification
llvm-svn: 10727
2004-01-09 06:12:26 +00:00
Brian Gaeke
d25f86d683 Put all LLVM code into the llvm namespace, as per bug 109.
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Chris Lattner
a8d3699eb3 Yet more fixes for constant expr shifts
llvm-svn: 9739
2003-11-05 20:43:58 +00:00
John Criswell
b402729b30 Added LLVM project notice to the top of every C++ source file.
Header files will be on the way.

llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner
5b814e067a Avoid doing pointless work. Amazingly, this makes us go faster.
Running the inliner on 252.eon used to take 48.4763s, now it takes 14.4148s.

In release mode, it went from taking 25.8741s to taking 11.5712s.

This also fixes a FIXME.

llvm-svn: 8890
2003-10-06 15:23:43 +00:00
Chris Lattner
5403f79db0 New const_cast instead of c style cast
llvm-svn: 5805
2003-04-18 03:49:49 +00:00
Chris Lattner
31a6321785 Add debugging helper
llvm-svn: 5235
2003-01-13 00:52:25 +00:00
Chris Lattner
fc15b7a661 Fix bug that was bugging bugpoint
llvm-svn: 4953
2002-12-07 21:27:16 +00:00
Chris Lattner
6aa0ec26d5 Initial checkin of Module cloning support stuff
llvm-svn: 4788
2002-11-20 20:47:41 +00:00