Commit Graph

35416 Commits

Author SHA1 Message Date
Victor Hernandez
ab9cd10721 Enumerate function-local metadata (and its types and operands) only during function-incorporation, global metadata continues to be enumerated during creation of ValueEnumerator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93338 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 19:36:16 +00:00
Victor Hernandez
fab9e99c01 Parse function-local metadata inside function blocks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93337 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 19:34:08 +00:00
Chris Lattner
cab16cc9a3 Use the GV version of getNameWithPrefix in TargetLoweringObjectFileCOFF::
SelectSectionForGlobal, unbreaking weak globals with no-name.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93336 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 19:19:17 +00:00
Evan Cheng
eb18812f75 Commit some changes I had managed to lose last night while refactoring the code. Avoid change use of PHI instructions because it's not legal to insert any instructions before them.
This fixes PR6027.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93335 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 19:16:39 +00:00
Chris Lattner
656bb20d61 just finish MCizing FnStubInfo which cleans it up and simplifies it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93334 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 19:13:16 +00:00
Chris Lattner
59b34fe55f don't call getNameWithPrefix repeatedly and unnecesarily.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93333 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 19:05:36 +00:00
Chris Lattner
0b4bad54f6 properly use MCSymbol to print the strings aquired from getNameWithPrefix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93332 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 19:00:57 +00:00
Benjamin Kramer
b357e06f67 Introduce Twine::toStringRef, a variant of toVector which avoids the copy if the
twine can be represented as a single StringRef. Use the new methode to simplify
some twine users.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93317 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 12:45:23 +00:00
Evan Cheng
81d22d87de Re-enable extension optimization pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93313 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 08:45:40 +00:00
Chris Lattner
09533a404c upgrade and MC'ize a few uses of makeNameProper.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93310 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 08:08:33 +00:00
Chris Lattner
13b1e92e6c MC'ize this a bit and upgrade APIs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93309 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 08:04:24 +00:00
Chris Lattner
4d5f06fbe5 add a fixme, ELF MCSection isn't quite right and weak unnamed globals are broken
on linux (even though they are pointless, they shouldn't ICE).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93308 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 08:02:14 +00:00
Evan Cheng
57d1d936fc For now, avoid issuing extract_subreg to reuse lower 8-bit, it's not safe in 32-bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93307 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 08:01:32 +00:00
Evan Cheng
d89d5180d1 Add comment; refactor; avoid pulling in DT if it's not used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93306 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 07:59:13 +00:00
Chris Lattner
ee9250bb4f eliminate some uses of Mangler::makeNameProper.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93305 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 07:56:59 +00:00
Chris Lattner
b74978f8e5 don't add the \1 to the name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93304 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 07:50:21 +00:00
Chris Lattner
2f8cc26be4 remove uses of deprecated functions, this generates slightly
different BlockAddress labels, but nothing semantically important.

Add a FIXME that BlockAddress codegen is broken if the LLVM BB has 
an empty name (e.g. strip was run).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93303 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 07:30:49 +00:00
Chris Lattner
dfbcb8c38b use the new form of getNameWithPrefix, not makeNameProper.
Among other things, this would do very weird things if the 
basic block name had (e.g.) a space in it on darwin:
makeNameProper would add quotes, then the mcsymbol would 
escape the quotes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93302 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 07:16:53 +00:00
Chris Lattner
bf86e5df18 add new isSingleStringRef()/getSingleStringRef() methods to twine,
and use them to avoid a copy of a string in getNameWithPrefix in
the common case.  It seems like Value::setName and other places 
should use this as well?


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93301 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 07:12:06 +00:00
Chris Lattner
0e7ab8cb07 ugh, my last patch just sped up a method and changed all the clients
that I want to completely eliminate.  Add fixme's so I remember this
in the future, and add the missing helper that they should be upgraded
to use instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93300 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 07:01:09 +00:00
Chris Lattner
4813035b72 change Mangler::makeNameProper to return its result in a SmallVector
instead of returning it in an std::string.  Based on this change:

1. Change TargetLoweringObjectFileCOFF::getCOFFSection to take a StringRef
2. Change a bunch of targets to call makeNameProper with a smallstring,
   making several of them *much* more efficient.
3. Rewrite Mangler::makeNameProper to not build names and then prepend
   prefixes, not use temporary std::strings, and to avoid other crimes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93298 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 06:38:18 +00:00
Chris Lattner
36e69ae3c1 my mistake, Mangler::makeNameProper wants to take a twine, not a stringref!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93296 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 05:02:57 +00:00
Chris Lattner
1cb75460b6 change makeNameProper to take a stringref instead of std::string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93295 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 04:55:33 +00:00
Chris Lattner
38c2b0a99c fix assert in AsmPrinter::EmitGlobalConstantLargeInt to match reality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93293 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 04:39:46 +00:00
Chris Lattner
5979dfff8e reduce nesting and code duplication in AsmPrinter::EmitGlobalConstantLargeInt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93292 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 04:38:16 +00:00
Chris Lattner
3cc3a00570 reduce indentation and add a fast-path to EmitGlobalConstant for 8-byte
integers on 64-bit systems.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93291 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 04:34:19 +00:00
Chris Lattner
fe0e7ed6b0 reduce indentation and use early exits in AsmPrinter::EmitConstantValueOnly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93290 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 04:29:19 +00:00
Victor Hernandez
3047384a0f Revert 93270 pending investigation of how stray non-constant values end up in ValueEnumerator's ValueList during WriteConstants()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93289 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 03:18:30 +00:00
Evan Cheng
262a96edb4 Disable opt-ext pass to unbreak the build for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93286 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 01:51:43 +00:00
Evan Cheng
d9e385f411 Remove debug option I accidentally left in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93285 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 01:43:20 +00:00
Ted Kremenek
ce3ad1565a Update CMake file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93283 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 01:02:47 +00:00
Jakob Stoklund Olesen
c5b7ef1519 Remove the JustSP single-register regclass.
It was only being used by instructions with the t_addrmode_sp addressing mode,
and that is pattern matched in a way that guarantees SP is used. There is
never any register allocation done from this class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93280 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 00:43:06 +00:00
Evan Cheng
7da9ecf967 Add a quick pass to optimize sign / zero extension instructions. For targets where the pre-extension values are available in the subreg of the result of the extension, replace the uses of the pre-extension value with the result + extract_subreg.
For now, this pass is fairly conservative. It only perform the replacement when both the pre- and post- extension values are used in the block. It will miss cases where the post-extension values are live, but not used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93278 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 00:30:23 +00:00
Dale Johannesen
5f72a5ebc8 Further progration of metadata operands. The
dumper doesn't really do what I want yet, but
at least it doesn't crash now.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93272 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 00:00:24 +00:00
Victor Hernandez
994a204570 Make WriteConstants() more robust against stray values in ValueEnumerator's ValueList
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93270 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-12 23:37:59 +00:00
Bob Wilson
86af655521 Fix a comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93261 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-12 22:18:56 +00:00
Chris Lattner
972a46c96a 1) Use the new SimplifyInstructionsInBlock routine instead of the copy
in JT.

2) When cloning blocks for PHI or xor conditions, use
instsimplify to simplify the code as we go.  This allows us to 
squish common cases early in JT which opens up opportunities for
subsequent iterations, and allows it to completely simplify the
testcase.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93253 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-12 20:41:47 +00:00
Chris Lattner
e234a30a28 add a helper function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93251 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-12 19:40:54 +00:00
Devang Patel
d77fdba573 Use Twine, instead of StringRef, for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93249 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-12 18:57:56 +00:00
Devang Patel
26028f27dd Use ilist_tratis to autoinsert and remove NamedMDNode from MDSymbolTable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93247 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-12 18:34:06 +00:00
Evan Cheng
3bda20112e Eliminate or_not_add and just use AddedComplexity so isel tries or_is_add patterns first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93245 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-12 18:31:19 +00:00
Duncan Sands
796248fdb1 Revert commit 93204, since it causes the assembler to barf
on x86-64 linux with messages like this:
Error: Incorrect register `%r14' used with `l' suffix


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93242 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-12 17:46:16 +00:00
Duncan Sands
990c4b87e3 Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93235 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-12 08:30:46 +00:00
Duncan Sands
e2de606e0b Tweak commit 91745, which changed target data for both Mingw and Cygwin,
to not touch Cygwin: the change caused llvm-gcc build failures due to
long double getting the wrong size.  Patch by Aaron Gray.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93234 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-12 08:21:07 +00:00
Dan Gohman
f1b4d26e67 Reapply the MOV64r0 patch, with a fix: MOV64r0 clobbers EFLAGS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93229 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-12 04:42:54 +00:00
Dan Gohman
21c14e3649 Update a partially obsolete comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93228 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-12 04:32:35 +00:00
Dan Gohman
5c9cf19d1e Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93227 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-12 04:30:26 +00:00
Chris Lattner
797c440caf tidy up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93222 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-12 02:07:50 +00:00
Chris Lattner
2249a0b1bd Teach jump threading to duplicate small blocks when the branch
condition is a xor with a phi node.  This eliminates nonsense
like this from 176.gcc in several places:

 LBB166_84:
        testl   %eax, %eax
-       setne   %al
-       xorb    %cl, %al
-       notb    %al
-       testb   $1, %al
-       je      LBB166_85
+       je      LBB166_69
+       jmp     LBB166_85

This is rdar://7391699



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93221 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-12 02:07:17 +00:00
Evan Cheng
a5a81d7072 Add TargetInstrInfo::isCoalescableInstr. It returns true if the specified
instruction is copy like where the source and destination registers can
overlap. This is to be used by the coalescable to coalesce the source and
destination registers of instructions like X86::MOVSX64rr32. Apparently
some crazy people believe the coalescer is too simple.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93210 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-12 00:09:37 +00:00
Chris Lattner
77beb479f5 some cleanup, and make it obvious that ProcessJumpOnPHI only works
on branches by renaming it and checking for a branch at the call site.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93208 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 23:41:09 +00:00
Evan Cheng
b85071c736 Add manual ISD::OR fastisel selection routines. TableGen is no longer autogen them after 93152 and 93191.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93204 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 22:59:27 +00:00
Chris Lattner
53af2d13e7 reenable the piece that turns trunc(zext(x)) -> x even if zext has multiple uses,
codegen has no apparent problem with the trunc version of this, because it turns
into a simple subreg idiom


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93202 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 22:49:40 +00:00
Chris Lattner
a958cbfe36 Disable folding sext(trunc(x)) -> x (and other similar cast/cast cases) when the
trunc has multiple uses.  Codegen is not able to coalesce the subreg case 
correctly and so this leads to higher register pressure and spilling (see PR5997).

This speeds up 256.bzip2 from 8.60 -> 8.04s on my machine, ~7%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93200 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 22:45:25 +00:00
Victor Hernandez
92f238dd8f Consolidate ConvertGlobalValIDToValue, ConvertGlobalOrMetadataValIDToValue, and ConvertValIDToValue into a more powerful ConvertValIDToValue() that does all three's work
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93197 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 22:31:58 +00:00
Evan Cheng
199c4240fe Extend r93152 to work on OR r, r. If the source set bits are known not to overlap, then select as an ADD instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93191 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 22:03:29 +00:00
Evan Cheng
05920b8146 Revert 93158. It's breaking quite a few x86_64 tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93185 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 21:13:41 +00:00
Jakob Stoklund Olesen
dd437ba15e Avoid adding PHI arguments for a predecessor that has gone away when a BRCOND was constant folded.
This fixes PR5980.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93184 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 21:02:33 +00:00
Benjamin Kramer
7dd6107fcc Remove unused string functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93183 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 20:33:12 +00:00
Evan Cheng
ac000fa0ed Do not turn 8-bit OR to ADD since ADD8ri is not 3-addressfiable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93182 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 20:18:04 +00:00
Mon P Wang
fe240b1066 Disable transformation of select of two loads to a select of address and then a load if the
loads are not in the default address space because the transformation discards src value info.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93180 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 20:12:49 +00:00
Benjamin Kramer
7462b5dd99 Add StrInStrNoCase, a StringRef version of CStrInCStrNoCase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93174 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 19:45:18 +00:00
Devang Patel
23598502ef s/NextValueNo/NextMDValueNo while processing metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93165 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 18:52:33 +00:00
Benjamin Kramer
c30837d6c1 Turns out llvm-gcc still uses SplitString with a vector. Add it back until I
have a fix.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93163 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 18:44:35 +00:00
Benjamin Kramer
d4f195999a Reimplement getToken and SplitString as "StringRef helper functions"
- getToken is modeled after StringRef::split but it can split on multiple
  separator chars and skips leading seperators.
- SplitString is a StringRef::split variant for more than 2 elements with the
  same behaviour as getToken.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93161 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 18:03:24 +00:00
Dan Gohman
e5dacc55ad Use a 32-bit and with implicit zero-extension instead of a 64-bit and if it
has an immediate with at least 32 bits of leading zeros, to avoid needing to
materialize that immediate in a register first.

FileCheckize, tidy, and extend a testcase to cover this case.

This fixes rdar://7527390.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93160 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 17:58:34 +00:00
Dan Gohman
71c25b7d7b Re-instate MOV64r0 and MOV16r0, with adjustments to work with the
new AsmPrinter. This is perhaps less elegant than describing them
in terms of MOV32r0 and subreg operations, but it allows the
current register to rematerialize them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93158 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 17:37:57 +00:00
Dan Gohman
7e0d64a49c Pattern top-level operators don't need to be restricted to a
single user. The _su forms are intended for non-top-level nodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93155 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 17:21:05 +00:00
Dan Gohman
9e83467baa Reword this comment to reference a more fundamental issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93154 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 17:14:46 +00:00
Evan Cheng
4b0345be30 Select an OR with immediate as an ADD if the input bits are known zero. This allow the instruction to be 3address-fied if needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93152 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 17:03:47 +00:00
David Greene
95eb2eeea6 Implement a feature (-vector-unaligned-mem) to allow targets to
ignore alignment requirements for SIMD memory operands.  This
is useful on architectures like the AMD 10h that do not trap on
unaligned references if a status bit is twiddled at startup time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93151 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 16:29:42 +00:00
Victor Hernandez
5b7e48b56c Respond to Chris' review:
Make InsertDbgValueIntrinsic() and get Offset take and recieve a uint64_t.
Get constness correct for getVariable() and getValue().



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93149 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 07:45:19 +00:00
Chris Lattner
8e76764de8 add one more bitfield optimization, allowing clang to generate
good code on PR4216:

_test_bitfield:                                             ## @test_bitfield
	orl	$32962, %edi
	movl	$4294941946, %eax
	andq	%rdi, %rax
	ret

instead of:

_test_bitfield:
        movl    $4294941696, %ecx
        movl    %edi, %eax
        orl     $194, %edi
        orl     $32768, %eax
        andq    $250, %rdi
        andq    %rax, %rcx
        movq    %rdi, %rax
        orq     %rcx, %rax
        ret

Evan is looking into the remaining andq+imm -> andl optimization.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93147 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 06:55:24 +00:00
Chris Lattner
7acc4b1281 Extend CanEvaluateZExtd to handle and/or/xor more aggressively in the
BitsToClear case.  This allows it to promote expressions which have an
and/or/xor after the lshr, promoting cases like test2 (from PR4216) 
and test3 (random extample extracted from a spec benchmark).

clang now compiles the code in PR4216 into:

_test_bitfield:                                             ## @test_bitfield
	movl	%edi, %eax
	orl	$194, %eax
	movl	$4294902010, %ecx
	andq	%rax, %rcx
	orl	$32768, %edi
	andq	$39936, %rdi
	movq	%rdi, %rax
	orq	%rcx, %rax
	ret

instead of:

_test_bitfield:                                             ## @test_bitfield
	movl	%edi, %eax
	orl	$194, %eax
	movl	$4294902010, %ecx
	andq	%rax, %rcx
	shrl	$8, %edi
	orl	$128, %edi
	shlq	$8, %rdi
	andq	$39936, %rdi
	movq	%rdi, %rax
	orq	%rcx, %rax
	ret

which is still not great, but is progress.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93145 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 04:05:13 +00:00
Chris Lattner
789162a309 Remove the dead TD argument to CanEvaluateZExtd, and add a
new BitsToClear result which allows us to start promoting
expressions that end with a lshr-by-constant.  This is
conservatively correct and better than what we had before
(see testcases) but still needs to be extended further.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93144 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 03:32:00 +00:00
Chris Lattner
8cf4f6f3dd improve comments, remove dead TD argument to CanEvaluateSExtd.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93143 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-11 02:43:35 +00:00
Chris Lattner
11ea812424 teach sext optimization to handle truncs from types that are not
the dest of the sext.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93128 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-10 20:30:41 +00:00
Chris Lattner
9ee947c224 teach zext optimization how to deal with truncs that don't come from
the zext dest type.  This allows us to handle test52/53 in cast.ll,
and allows llvm-gcc to generate much better code for PR4216 in -m64
mode:

_test_bitfield:                                             ## @test_bitfield
	orl	$32962, %edi
	movl	%edi, %eax
	andl	$-25350, %eax
	ret

This also fixes a bug handling vector extends, ensuring that the
mask produced is a vector constant, not an integer constant.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93127 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-10 20:25:54 +00:00
Chris Lattner
859c372e04 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
2010-01-10 20:21:42 +00:00
Mikhail Glushenkov
0d75d874bf Suppress a warning on gcc 4.4.
warning: suggest parentheses around ‘&&’ within ‘||’.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93121 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-10 18:48:49 +00:00
Chris Lattner
aa9c894523 simplify CanEvaluateSExtd to return a bool now that we have a
simpler profitability predicate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93111 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-10 07:57:20 +00:00
Chris Lattner
6954ceec1a the NumCastsRemoved argument to CanEvaluateSExtd is dead, remove it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93110 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-10 07:42:21 +00:00
Chris Lattner
dde5ee5d37 now that the cost model has changed, we can always consider
elimination of a sign extend to be a win, which simplifies 
the client of CanEvaluateSExtd, and allows us to eliminate
more casts (examples taken from real code).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93109 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-10 07:40:50 +00:00
Victor Hernandez
24e64df7ec Compute isFunctionLocal in MDNode ctor or via argument in new function getWhenValsUnresolved().
Document PFS argument to ParseValID() and ConvertGlobalOrMetadataValIDToValue().



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93108 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-10 07:14:18 +00:00
Chris Lattner
f4fb91181c change the preferred canonical form for a sign extension to be
lshr+ashr instead of trunc+sext.  We want to avoid type 
conversions whenever possible, it is easier to codegen expressions
without truncates and extensions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93107 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-10 07:08:30 +00:00
Chris Lattner
abff82d99e fix indentation of switch statements, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93106 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-10 06:59:55 +00:00
Chris Lattner
6091e0289b fix pasto that broke bootstrap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93105 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-10 06:50:04 +00:00
Chris Lattner
9e390ddf91 simplify CanEvaluateZExtd now that we don't care about the number of
bits known clear in the result and don't care about the # casts 
eliminated.  TD is also dead but keeping it for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93098 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-10 02:50:04 +00:00
Chris Lattner
5324d80283 two changes:
1) don't try to optimize a sext or zext that is only used by a trunc, let
   the trunc get optimized first.  This avoids some pointless effort in
   some common cases since instcombine scans down a block in the first pass.
2) Change the cost model for zext elimination to consider an 'and' cheaper
   than a zext.  This allows us to do it more aggressively, and for the next
   patch to simplify the code quite a bit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93097 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-10 02:39:31 +00:00
Chris Lattner
d26c9e183e enhance CanEvaluateZExtd to handle shift left and sext, allowing
more expressions to be promoted and casts eliminated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93096 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-10 02:22:12 +00:00
Chris Lattner
3f7dc880c4 remove an xform subsumed by EvaluateInDifferentType.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93095 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-10 01:35:55 +00:00
Julien Lerouge
5c1735a4df Fix nondeterministic behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93093 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-10 01:07:22 +00:00
Chris Lattner
4f37978b90 clean up this xform by using m_Trunc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93092 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-10 01:04:31 +00:00
Chris Lattner
d84dfa43f2 inline and remove the rest of commonIntCastTransforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93091 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-10 01:00:46 +00:00
Chris Lattner
75215c9e39 Inline the expression type promotion/demotion stuff out of
commonIntCastTransforms into the callers, eliminating a switch,
and allowing the static predicate  methods to be moved down to
live next to the corresponding function.  No functionality 
change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93089 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-10 00:58:42 +00:00
Chris Lattner
d686c8e73f "In order to ease automatic bindings generation, it would be helpful if boolean values were distinguishable from integers. The attached patch introduces "typedef int LLVMBool;", and uses LLVMBool instead of int throughout the C API, wherever a boolean value is called for."
Patch by James Y Knight!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93079 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-09 22:27:07 +00:00
Chris Lattner
2fdf8dbed5 fix PR5983, reject function bodies with no blocks per the grammar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93067 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-09 19:20:07 +00:00
Jeffrey Yasskin
a77169dbeb Fix http://llvm.org/PR5729: x86-64 tail calls were putting their targets into
R11, and then asserting that the target was in R9.  Since R9 isn't reserved for
the target anymore, and is used as an argument, this patch changes the
assertion.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93065 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-09 18:56:43 +00:00
Dan Gohman
3073329c53 Use WriteAsOperand instead of getName() to print loop header names,
so that unnamed blocks are handled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93059 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-09 18:17:45 +00:00
David Chisnall
3472246ede Fixed linking of modules containing aliases to constant bitcasts. Existing behaviour first tried to replace the aliases with the global that they aliased (rather than the bitcast), causing a crash on an assert because the types didn't match. When this was fixed, it then did the same thing creating the new alias (creating an alias with a different type to its aliasee).
Linking modules containing aliases to GEPs is still not quite right.  GEPs that are equivalent to bitcasts will be replaced by bitcasts, GEPs that are not will just break.  Aliases to GEPs that are not equivalent to bitcasts are horribly broken anyway (it might be worth adding an assert when creating the alias to prevent these being created; they just cause problems later).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93052 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-09 16:27:31 +00:00
Duncan Sands
1fa8b00b30 Suppress use of uninitialized variable warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93046 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-09 08:30:33 +00:00
Chris Lattner
c2d1b6949c only factor from expressions whose uses are empty and whose
base is the right expression type.  This fixes PR5981.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93045 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-09 06:01:36 +00:00
Dan Gohman
d199636039 Revert an earlier change to SIGN_EXTEND_INREG for vectors. The VTSDNode
really does need to be a vector type, because
TargetLowering::getOperationAction for SIGN_EXTEND_INREG uses that type,
and it needs to be able to distinguish between vectors and scalars.

Also, fix some more issues with legalization of vector casts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93043 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-09 02:13:55 +00:00
Chris Lattner
70644e92d8 clean up this code, add a fixme.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93042 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-09 02:02:37 +00:00
Devang Patel
87df867fd7 Delete NamedMDSymTable while destrucing Module.
Disable  copy ctor and operator= for NamedMDSymTable. Hide typedef that should be public.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93041 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-09 01:44:59 +00:00
Devang Patel
380e80fb53 NamedMDNode is never used so there is no need to enumerate it here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93039 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-09 01:24:03 +00:00
Julien Lerouge
c5dd34209b Fix nondeterministic behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93038 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-09 01:06:49 +00:00
Devang Patel
7f9664699e NamedMDNode element is either null or MDNode. Otherwise this is a malformed NamedMDNode record.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93037 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-09 01:02:22 +00:00
Devang Patel
8fba578be7 Derive NamedMDNode from Value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93032 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-09 00:30:14 +00:00
Evan Cheng
54e146b935 Dan pointed out checking whether a node is dead by comparing its opcode to ISD::DELETED_NODE is not safe. Use a DAGUpdateListener to remove dead nodes from work list instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93031 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-09 00:21:08 +00:00
Evan Cheng
306b4cafc1 Fix a critical bug in 64-bit atomic operation lowering for 32-bit. The results of the cmpxchg8b instructions are being thrown away when it branches back to the top of the checking loop. This means the loop always compares against the old value and this can result in a dead lock.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93028 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-08 23:41:50 +00:00
Eric Christopher
4d1f58861d Remove unnecessary dyn_cast and add a comment. Part of a WIP.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93026 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-08 21:37:11 +00:00
Chris Lattner
c8b3fce5c5 mplement a theoretical fixme.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93024 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-08 19:28:47 +00:00
Chris Lattner
14bf8f0285 rename CanEvaluateInDifferentType -> CanEvaluateTruncated and
simplify it now that it is only used for truncates.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93021 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-08 19:19:23 +00:00
Evan Cheng
ad5b52fd5e Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93020 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-08 19:14:57 +00:00
Chris Lattner
a85732fa3b teach instcombine to delete sign extending shift pairs (sra(shl X, C), C) when
the input is already sign extended.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93019 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-08 19:04:21 +00:00
Chris Lattner
b31189f262 fix PR5978 by peeling the loop so that we avoid shifting the
result int by 8 for the first byte.  While normally harmless,
if the result is smaller than a byte, this shift is invalid.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93018 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-08 19:02:23 +00:00
Duncan Sands
54a57045eb Suppress an unused variable warning when assertions are off;
remove some trailing whitespace while there.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93008 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-08 17:51:48 +00:00
Chris Lattner
9aa1e246dd tidy up some stuff duncan pointed out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93007 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-08 17:48:19 +00:00
Johnny Chen
d248ffb7d5 Minor change, change the order of two "let Inst{...}" stmts within multiclass
T2I_bin_ii12rs definition.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93006 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-08 17:41:33 +00:00
Eric Christopher
968b35ff47 After further thought revert the patch to make fast-isel avoid
putting relocations into the constant pool - this isn't needed
for correctness and in the rare occasion it happens would pull
us out of fast isel for the block.

If fast-isel application startup time ever becomes an issue we
can add better support for these addresses instead of bailing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92995 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-08 08:24:49 +00:00
Evan Cheng
6f279e0bda ReplaceAllUsesOfValueWith may delete other nodes that the one being replaced. Do not delete dead nodes again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92988 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-08 02:36:12 +00:00
Evan Cheng
b093bd0565 Fix what looks to me obvious instruction definition bugs.
1. CMPXCHG8B and CMPXCHG16B did not specify implicit physical register defs and uses.
2. LCMPXCHG8B is loading 64 bit memory, not 32 bit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92985 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-08 01:29:19 +00:00
Eric Christopher
d74a7d4e2c Remove extraneous include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92972 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-08 00:05:33 +00:00
Chris Lattner
8d10f9d4a8 teach ComputeNumSignBits to look through PHI nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92964 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-07 23:44:37 +00:00
Chris Lattner
075f692939 Enhance instcombine to reason more strongly about promoting computation
that feeds into a zext, similar to the patch I did yesterday for sext.
There is a lot of room for extension beyond this patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92962 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-07 23:41:00 +00:00
Chris Lattner
bd1fccfad5 Fix rdar://7517201, a regression introduced by r92849.
When folding a and(any_ext(load)) both the any_ext and the
load have to have only a single use.

This removes the anyext-uses.ll testcase which started failing
because it is unreduced and unclear what it is testing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92950 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-07 21:59:23 +00:00
Chris Lattner
ef7634ca48 factor this code better and reduce nesting at the same
time, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92948 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-07 21:53:27 +00:00
Evan Cheng
347a9cb507 APInt'fy TargetLowering::SimplifySetCC to fix PR5963.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92943 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-07 20:58:44 +00:00
Benjamin Kramer
2e0de6f771 Simplify code. No intended functionality/performance change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92938 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-07 19:46:15 +00:00
Eric Christopher
e6c74c9c2a If the data requires a relocation then don't attempt to
add it to the constant pool for fast-isel. We already
don't add it for the normal case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92934 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-07 19:45:14 +00:00
Eric Christopher
a07b750405 We need to put any kind of data with a relocation into a
not-readonly segment on darwin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92933 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-07 19:44:05 +00:00
Devang Patel
0386f01e06 Use separate namespace for named metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92931 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-07 19:39:36 +00:00
Chris Lattner
ddac706747 constant materialization could be improved.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92921 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-07 17:53:10 +00:00
Benjamin Kramer
3d594fd299 Kill dead store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92920 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-07 17:50:57 +00:00
Benjamin Kramer
e7078aed24 Remove dead variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92919 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-07 17:29:08 +00:00
Benjamin Kramer
7b1e2a50a5 Use pop_back_val instead of back()+pop_back.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92918 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-07 17:27:56 +00:00
Benjamin Kramer
66b581ef49 Use a do-while loop instead of while + boolean.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92912 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-07 13:50:07 +00:00
Duncan Sands
5d8ea117a0 Be less stingy as to how many selects and phi nodes we
are prepared to look through.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92898 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-07 05:48:42 +00:00
Douglas Gregor
2772ea831c More trivial optimizations to a function well outside the critical path
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92896 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-07 02:24:06 +00:00
Chris Lattner
4039bd0550 handle ConstantVector while I'm in here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92892 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-07 01:20:20 +00:00
Chris Lattner
a0e9a2475c fix a globalopt crash on 'bullet' (handling evaluation of a store
to an element of a vector in a static ctor) which occurs with an 
unrelated patch I'm testing.  Annoyingly, EvaluateStoreInto basically 
does exactly the same stuff as InsertElement constant folding, but it
now handles vectors, and you can't insertelement into a vector.  It
would be 'really nice' if GEP into a vector were not legal.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92889 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-07 01:16:21 +00:00
Evan Cheng
17751dac3e Fix a minor regression from my dag combiner changes. One more place which needs to look pass truncates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92885 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-07 00:54:06 +00:00
Douglas Gregor
ad6b6da8aa Switch StringRef::edit_distance over to using raw pointers, since both
std::vector and llvm::SmallVector have annoying performance
tradeoffs. No, I don't expect this to matter, and now it won't.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92884 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-07 00:51:54 +00:00
Jim Grosbach
9631864688 80 column violations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92876 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-06 23:54:42 +00:00
Jakob Stoklund Olesen
541e9ae3ad Allow double defs after tail duplication.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92874 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-06 23:52:46 +00:00
Jakob Stoklund Olesen
30ac0467ce Add Target hook to duplicate machine instructions.
Some instructions refer to unique labels, and so cannot be trivially cloned
with CloneMachineInstr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92873 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-06 23:47:07 +00:00
Jim Grosbach
ce3e769c15 Addressing mode 6 (load/store) instructions can't encode an immediate offset
for stack references.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92871 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-06 23:45:18 +00:00
Jim Grosbach
80c2b0d9ef Anti-dependency breaking needs to be careful regarding instructions with
multiple register definitions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92864 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-06 22:21:25 +00:00
Eric Christopher
130063207d Move the object size intrinsic optimization to inst-combine and make
it work for any integer size return type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92853 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-06 20:04:44 +00:00
Evan Cheng
54eb4c2991 Comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92850 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-06 19:43:21 +00:00
Evan Cheng
d40d03e1bd Teach dag combine to fold the following transformation more aggressively:
(OP (trunc x), (trunc y)) -> (trunc (OP x, y))

Unfortunately this simple change causes dag combine to infinite looping. The problem is the shrink demanded ops optimization tend to canonicalize expressions in the opposite manner. That is badness. This patch disable those optimizations in dag combine but instead it is done as a late pass in sdisel.

This also exposes some deficiencies in dag combine and x86 setcc / brcond lowering. Teach them to look pass ISD::TRUNCATE in various places.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92849 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-06 19:38:29 +00:00
Victor Hernandez
76bf310b7a When parsing function-local metadata, create a function-local MDNode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92838 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-06 17:00:21 +00:00
Jim Grosbach
2973b57093 80 column and whitespace cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92837 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-06 16:48:02 +00:00
Duncan Sands
e10920d678 Fix a README item: have functionattrs look through selects and
phi nodes when deciding which pointers point to local memory.
I actually checked long ago how useful this is, and it isn't
very: it hardly ever fires in the testsuite, but since Chris
wants it here it is!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92836 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-06 15:37:47 +00:00
Mikhail Glushenkov
0ecbdeb14f Formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92831 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-06 09:20:39 +00:00
Lang Hames
421c0733fd Fixed malformed -*- lines in PBQP headers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92830 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-06 08:53:34 +00:00
Duncan Sands
7c422ac216 Partially address a README by having functionattrs consider calls to
memcpy, memset and other intrinsics that only access their arguments
to be readnone if the intrinsic's arguments all point to local memory.
This improves the testcase in the README to readonly, but it could in
theory be made readnone, however this would involve more sophisticated
analysis that looks through the memcpy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92829 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-06 08:45:52 +00:00
Chris Lattner
5c24a6da29 tweaks suggested by Duncan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92824 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-06 05:32:15 +00:00
Dale Johannesen
b7339d079d Reenable debug info on PPC. Works well enough to
bootstrap.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92818 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-06 02:21:00 +00:00
Dale Johannesen
e89c510c0a Make sure debug info hook gets called when emitting
synonyms for PPC.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92817 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-06 02:20:18 +00:00
Chris Lattner
e0e4cc7fd5 Teach instcombine's sext elimination logic to be more aggressive.
Previously, instcombine would only promote an expression tree to
the larger type if doing so eliminated two casts.  This is because
a need to manually do the sign extend after the promoted expression
tree with two shifts.  Now, we keep track of whether the result of
the computation is going to be properly sign extended already.  If
so, we can unconditionally promote the expression, which allows us
to zap more sext's.

This implements rdar://6598839 (aka gcc pr38751)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92815 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-06 01:56:21 +00:00
Jakob Stoklund Olesen
8efadf94b5 Add <imp-def> and <imp-kill> operands when replacing virtual sub-register defs and kills.
An instruction like this:

  %reg1097:1<def> = VMOVSR %R3<kill>, 14, %reg0

Must be replaced with this when substituting physical registers:

  %S0<def> = VMOVSR %R3<kill>, 14, %reg0, %D0<imp-def>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92812 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-06 00:29:28 +00:00
Bill Wendling
3f09487404 The previous code could potentially cause a cycle. Allow ordering w.r.t. a 0 order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92810 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-06 00:23:35 +00:00
Bill Wendling
cfeea4b92a Only check the ordering if there is an ordering for each nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92807 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-06 00:09:23 +00:00
Bill Wendling
247fb4ebd3 Add a semi-primitive form of scheduling via the "SDNode ordering" to the
bottom-up scheduler. We prefer the lower order number.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92806 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 23:48:12 +00:00
Chris Lattner
68c6e8998b simplify this code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92800 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 23:00:30 +00:00
Bill Wendling
9f7c5c0dca Don't assign the shift the same type as the variable being shifted. This could
result in illegal types for the SHL operator.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92797 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 22:39:10 +00:00
Johnny Chen
8314299161 Undo r92785, it caused test failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92796 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 22:37:28 +00:00
Chris Lattner
94aab49339 make this a static function instead of a method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92795 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 22:30:42 +00:00
Dan Gohman
7c3ecb6838 Don't use the ISD::NodeType enum for SDNode opcodes, as CodeGen
uses several kinds of opcode values which are not declared within
that enum. This fixes PR5946.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92794 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 22:26:32 +00:00
Victor Hernandez
bf170d4c2f Re-add parsing of function-local metadata; this time with testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92793 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 22:22:14 +00:00
Chris Lattner
7a34d6c450 more rearrangement and cleanup, fix my test failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92792 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 22:21:18 +00:00
Chris Lattner
274ad68cc7 cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92790 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 22:07:33 +00:00
Chris Lattner
c0f79af143 remove two trunc xforms that are subsumed by EvaluateInDifferentType.
The only difference is that EvaluateInDifferentType checks to ensure
they are profitable before doing them :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92788 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 22:01:41 +00:00
Johnny Chen
83f1136cfd Add Rt2 to the asm format string for 32-bit Thumb load/store register dual
instructions.  Thumb does not have the restriction that t2 = t+1.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92785 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 21:51:46 +00:00
Devang Patel
69d02e0a17 Allow null to be an element of NamedMDNode. e.g. !llvm.stuff = !{!0, !1, null}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92783 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 21:47:32 +00:00
Jakob Stoklund Olesen
e5319202af Don't specify CR sub-registers as implicit defs of BL instructions.
It is enough to give the super registers CR0, CR1, ..., and specifying the
sub-registers as well causes confusion in the liveness computations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92778 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 21:38:37 +00:00
Chris Lattner
464dc81803 just remove this xform which is subsumed by others.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92775 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 21:16:30 +00:00
Victor Hernandez
771150accb Fix comment for CheckDebugInfoIntrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92774 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 21:13:46 +00:00
Chris Lattner
49bdfefc8d move a trunc-specific transform out of commonIntCastTransforms into visitTrunc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92773 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 21:11:17 +00:00
Dan Gohman
dda30cd4af Restore dump() methods to Loop and MachineLoop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92772 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 21:08:02 +00:00
Benjamin Kramer
8c65f6e71c Move remaining stuff to the isInteger predicate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92771 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 21:05:54 +00:00
Chris Lattner
718bf3f89d move a zext specific xform out of commonIntCastTransforms into visitZExt and modernize it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92770 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 21:04:47 +00:00
Jakob Stoklund Olesen
b31defe94c Remove livein checks from machine code verifier.
A phi operand that is implicitly defined in a predecessor becomes an undefined
register after phi elimination. This causes a lot of false positives when the
verifier is checking if live-in registers are live-out from all predecessors.

Removing the verifier checks seems like a better solution than insisting on
IMPLICIT_DEF instructions in predecessor blocks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92769 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 20:59:36 +00:00
Chris Lattner
f86d799a29 move a trunc-specific xform out of commonIntCastTransforms into visitTrunc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92768 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 20:57:30 +00:00
Chris Lattner
3168c7dd25 reduce indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92766 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 20:56:24 +00:00
Devang Patel
3e30c2a3c5 NamedMDNode is a collection MDNodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92761 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 20:41:31 +00:00
Benjamin Kramer
11acaa374c 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
2010-01-05 20:07:06 +00:00
Benjamin Kramer
13be48701d Add a new predicate for integer type equality tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92759 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 20:04:48 +00:00
Chris Lattner
033574074d optimize comparisons against cttz/ctlz/ctpop, patch by Alastair Lynn!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92745 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 18:09:56 +00:00
Dan Gohman
ba25f0924e Nick Lewycky pointed out that this code makes changes unconditionally.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92739 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 17:50:58 +00:00
Devang Patel
ee890edd69 If a scope has only one instruction then first instruction is also the last instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92736 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 16:59:17 +00:00
Dan Gohman
9fff2187a2 Set Changed properly after calling DeleteDeadPHIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92735 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 16:31:45 +00:00
Dan Gohman
321a813c53 Use do+while instead of while for loops which obviously have a
non-zero trip count. Use SmallVector's pop_back_val().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92734 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 16:27:25 +00:00
Dan Gohman
b7a9f2b504 Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92733 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 16:20:55 +00:00
Dan Gohman
90fe0bd68c Make RecursivelyDeleteTriviallyDeadInstructions,
RecursivelyDeleteDeadPHINode, and DeleteDeadPHIs return a flag
indicating whether they made any changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92732 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 15:45:31 +00:00
Benjamin Kramer
eade002094 Add newline at EOF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92727 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 13:32:48 +00:00
Benjamin Kramer
f012705c7e 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
2010-01-05 13:12:22 +00:00
Chris Lattner
804272c8d6 prune some #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92712 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 07:54:43 +00:00
Chris Lattner
25f2a23b4a split and/or/xor out into one overly-large (2000LOC) file. However, I think
it does make sense to keep them together, at least for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92711 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 07:50:36 +00:00
Chris Lattner
d3c5b2d322 missed file with previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92710 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 07:45:02 +00:00
Chris Lattner
9cdd5f3fe3 split instcombine of shifts out to its own file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92709 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 07:44:46 +00:00
Chris Lattner
948cdeba97 eliminate getBitCastOperand and simplify some over-complex inbounds stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92708 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 07:42:10 +00:00
Chris Lattner
753a2b464d split call handling out to InstCombineCalls.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92707 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 07:32:13 +00:00
Chris Lattner
16507fe9fd optimize cttz and ctlz when we can prove something about the
leading/trailing bits.  Patch by Alastair Lynn!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92706 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 07:23:56 +00:00
Chris Lattner
f87cd93e0c this inline function moved to addsub
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92705 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 07:20:54 +00:00
Chris Lattner
53a19b73b5 split add/sub out to its own file. Eliminate use of
dyn_castNotVal in the X+~X transform.  dyn_castNotVal is
dramatic overkill for what the xform needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92704 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 07:18:46 +00:00
Chris Lattner
248a84beb3 all the places we use hasOneUse() we know are instructions, so inline
and simplify.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92700 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 07:04:23 +00:00
Chris Lattner
dea34da6f8 eliminate AssociativeOpt and its last uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92697 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 07:01:16 +00:00
Chris Lattner
a317e044fb inline the FoldICmpLogical functor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92695 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 06:59:49 +00:00
Evan Cheng
54de3ea1ca Code refactoring.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92694 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 06:52:31 +00:00
Chris Lattner
32c0cf5af9 inline the 'AddRHS' transformation, simplifying things significantly.
Eliminate the 'AddMaskingAnd' transformation, it is redundant with this
more general code right below it:
  // A+B --> A|B iff A and B have no bits set in common.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92693 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 06:29:13 +00:00
Chris Lattner
d0db8e8bad remove massive over-genality manifested as a big template
that got instantiated.  There is no reason for instcombine
to try this hard for simple associative optimizations.  Next
up, eliminate the template completely.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92692 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 06:24:06 +00:00
Chris Lattner
d12c27ce00 split mul/div/rem instructions out to their own file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92689 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 06:09:35 +00:00
Chris Lattner
1c22c80d71 clean up header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92688 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 06:05:07 +00:00
Chris Lattner
c6334b97e1 split select out to its own file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92687 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 06:03:12 +00:00
Chris Lattner
8d9b8d717e split out load/store/alloca.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92685 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 05:57:49 +00:00
Chris Lattner
d5da271863 reduce indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92684 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 05:42:08 +00:00
Chris Lattner
b8a5cecd6b split vector stuff out to InstCombineVectorOps.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92683 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 05:36:20 +00:00
Chris Lattner
f54e729629 split PHI node stuff out to InstCombinePHI.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92682 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 05:31:55 +00:00
Chris Lattner
43fd9017a6 convert various IntrinsicInst's to use class instead of struct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92681 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 05:21:26 +00:00
Chris Lattner
5f94af0f72 fix an infinite loop in reassociate building emacs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92679 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 04:55:35 +00:00
David Greene
2abc1ec2dd Change this back to errs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92674 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:55:22 +00:00
David Greene
c74fe78c2d These should probably be errs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92673 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:53:59 +00:00
Devang Patel
614d2ad0af Delete renaming use of dead dbg intrinsics.
Intrinsic::dbg_stoppoint
 Intrinsic::dbg_region_start
 Intrinsic::dbg_region_end
 Intrinsic::dbg_func_start



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92672 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:47:06 +00:00
Devang Patel
351ca33284 Use StringRef.startswith().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92671 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:46:14 +00:00
David Greene
da23d93d9b Fix a build error and change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92669 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:34:26 +00:00
David Greene
9a6c940d7c Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92665 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:30:18 +00:00
David Greene
c1bda3b8ff Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92664 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:30:14 +00:00
David Greene
6892c7a92d Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92663 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:30:09 +00:00
David Greene
efc258146d Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92662 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:30:06 +00:00
David Greene
840d41e7d1 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92661 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:30:04 +00:00
David Greene
170c48af5a Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92660 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:30:02 +00:00
David Greene
43078d6931 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92659 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:30:00 +00:00
David Greene
ef1894ed7e Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92658 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:29:58 +00:00
David Greene
fc524526e4 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92657 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:29:55 +00:00
David Greene
c0a6a2afcb Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92656 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:29:39 +00:00
David Greene
9759c305c2 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92655 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:29:36 +00:00
David Greene
f5c95a6ee2 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92654 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:29:34 +00:00
David Greene
5b90132332 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92653 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:29:29 +00:00
David Greene
d865e02ea2 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92652 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:29:26 +00:00
David Greene
92f164416b Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92651 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:29:23 +00:00
David Greene
d2e63b7fdb Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92650 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:29:19 +00:00
David Greene
4b12168ce5 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92649 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:29:14 +00:00
David Greene
bd7b8458d1 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92648 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:29:13 +00:00
David Greene
d7f4f24d3f Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92647 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:29:08 +00:00
David Greene
fcb5b831f6 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92646 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:29:03 +00:00
David Greene
da80ff6ae6 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92645 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:28:58 +00:00
David Greene
c719d5f621 Change errs() to dbgs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92644 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-05 01:28:53 +00:00