Commit Graph

32023 Commits

Author SHA1 Message Date
Chris Lattner
7ffa3c8029 add a hack to lower MOV16r0 to MOV32r0 in MCInstLower, eliminating
the problem with subreg32 modifiers.  This gets all of Olden working
with the new asmprinter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81195 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 05:49:25 +00:00
Nick Lewycky
8f5075b966 Hoist out the test+insert to CheckedTypes. This doesn't seem to affect
performance.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81193 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 05:46:15 +00:00
Chris Lattner
ba3598cb1f fix PR4767, a crash because fp stackifier visited blocks in
depth first order, so it wouldn't process unreachable blocks.
When compiling at -O0, late dead block elimination isn't done
and the bad instructions got to isel.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81187 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 04:55:44 +00:00
Chris Lattner
687bc9bfde remove a turd
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81186 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 03:47:41 +00:00
Chris Lattner
4cb81bdd56 instcombine transforms vector loads that are only used by
extractelement operations into a bitcast of the pointer,
then a gep, then a scalar load.  Disable this when the vector
only has one element, because it leads to infinite loops in
instcombine (PR4908).

This transformation seems like a really bad idea to me, as it
will likely disable CSE of vector load/stores etc and can be
better done in the code generator when profitable.  This
goes all the way back to the first days of packed types,
r25299 specifically.

I'll let those people who care about the performance of vector
code decide what to do with this.





git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81185 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 03:44:51 +00:00
Nick Lewycky
4b6af8aa5b Simplify from my last change. Assert1 is a macro that makes its caller return,
so "Assert1(isa<>); cast<>" is a valid idiom.

Actually check the PHI node's odd-numbered operands for BasicBlock-ness, like
the comment said.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81182 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 02:02:39 +00:00
Dan Gohman
ed48caf5e7 Fix an abort on a store of an empty struct member. getValue returns
null in the case of an empty struct, so don't try to call getNumValues
on it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81180 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 01:44:02 +00:00
Nick Lewycky
49072473ba Verify types. Invalid types can be constructed when assertions are off.
Make the verifier more robust by avoiding unprotected cast<> calls. Notably,
Assert1(isa<>); cast<> is not safe as Assert1 does not terminate the program.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81179 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 01:23:52 +00:00
Chris Lattner
ff1e98c72a Fix PR4882, by making MemCpyOpt not dereference removed stores to get the
context for the newly created operations.
 
Patch by Jakub Staszak!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81175 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 00:27:14 +00:00
Chris Lattner
b9a4ddbbcd fix ComputeMaskedBits handling of zext/sext/trunc to work with vectors.
This fixes PR4905


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81174 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 00:13:52 +00:00
Chris Lattner
cf5128ec01 add some comments to describe the invariants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81173 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-08 00:06:16 +00:00
Dan Gohman
f8dbee7cea 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
2009-09-07 23:54:19 +00:00
Dan Gohman
fd06aa7c07 Fix a thinko: When lowering fneg with xor, bitcast the operands
from floating-point to integer first, and bitcast the result
back to floating-point. Previously, this test was passing by
falling back to SelectionDAG lowering. The resulting code isn't
as nice, but it's correct and CodeGen now stays on the fast path.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81171 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 23:47:14 +00:00
Dan Gohman
80bdc967e9 Don't commit stores with addresses that have indices that are not
compile-time constant integers or that are out of bounds for their
corresponding static array types. These can cause aliasing that
GlobalOpt assumes won't happen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81165 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 22:44:55 +00:00
Dan Gohman
ce5de5b527 Don't commit addresses of aggregate values. This avoids problems with
an aggregate store overlapping a different aggregate store, despite
the stores having distinct addresses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81164 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 22:42:05 +00:00
Dan Gohman
c62482d4ed Fix GlobalOpt to avoid committing a store if the address getelementptr
is missing the inbounds flag. This is slightly conservative, but it
avoids problems with two constants pointing to the same address but
getting distinct entries in the Memory DenseMap.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81163 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 22:40:13 +00:00
Dan Gohman
4a7e6b7a15 Preserve the InBounds flag when evaluating a getelementptr instruction
into a getelementptr ConstantExpr.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81162 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 22:34:43 +00:00
Dan Gohman
fd54a898be Simplify this code by using hasDefinitiveInitializer().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81161 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 22:31:26 +00:00
Nick Lewycky
a9b7738d13 Express this in the canonical way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81157 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 21:50:24 +00:00
Nick Lewycky
29ef6599ee Homogenize whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81156 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 20:44:51 +00:00
Duncan Sands
3429c5e153 Using a signal handler that does nothing should be
equivalent to SIG_IGN.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81144 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 05:58:25 +00:00
Daniel Dunbar
d34b0b1cda Disable MDNode uniquing.
- Hopefully this unbreaks some llvm-gcc bootstraps.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81141 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 04:05:49 +00:00
Eric Christopher
f61f89ae14 Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81138 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-06 22:20:54 +00:00
Anton Korobeynikov
6c4025773a Do not create calls via PLT in compilation callback - this is higly platform
dependent. Hopefully, this will fix PR3801.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81132 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-06 20:21:48 +00:00
Duncan Sands
f7f4ba6c1f Do not try to override non-virtual methods, especially
when the new method gives the same result as the original
(as far as I can see).  This will hopefully pacify icc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81131 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-06 20:02:00 +00:00
Duncan Sands
da9ad384af Remove a left over bit of code with no effect.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81128 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-06 19:29:07 +00:00
Duncan Sands
0268790ba4 Avoid warnings if assertions are off.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81127 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-06 19:28:38 +00:00
Duncan Sands
33ef807145 Remove unreachable code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81126 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-06 19:27:53 +00:00
Duncan Sands
5149852975 Simplify. Testing shows that this is not equivalent to BBI = CR.CaseBB + 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81124 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-06 18:03:32 +00:00
Duncan Sands
875f4ae789 Avoid an unused variable warning when assertions are
disabled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81122 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-06 16:27:34 +00:00
Duncan Sands
18f13c66bf Mark more constants unsigned, as warned about by icc (#68).
Patch by Erick Tryzelaar.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81116 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-06 12:56:52 +00:00
Duncan Sands
c2d98bc0d6 Remove some not-really-used variables, as warned
about by icc (#593, partial).  Patch by Erick Tryzelaar.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81115 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-06 12:41:19 +00:00
Benjamin Kramer
8b3594afdb More MSVC warning fixes:
1. DUPMAX is defined in regcomp.c, no need to redefine it in regutils.
2. MSVC doesn't like snprintf, use _snprintf instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81114 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-06 12:26:28 +00:00
Duncan Sands
613c581b81 Remove strange 'const' qualifiers, as warned about by icc
(#411).  Patch by Erick Tryzelaar.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81113 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-06 12:16:26 +00:00
Benjamin Kramer
be441c0f34 It's a bool, so treat it like one. Fixes a MSVC warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81112 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-06 12:10:17 +00:00
Duncan Sands
740eb5323e Tweak code into an equivalent form for which icc
doesn't warn about unreachable instructions.  Patch
by Erick Tryzelaar (#111).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81110 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-06 10:53:22 +00:00
Benjamin Kramer
5b7c3567a1 Remove splint hints to silence warnings from ICC and MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81108 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-06 09:29:39 +00:00
Duncan Sands
59bf4fcc06 Public and private corrections, warned about by icc (#304).
Patch by Erick Tryzelaar.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81107 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-06 08:55:57 +00:00
Duncan Sands
b7c5bdf843 Remove some unused variables and methods warned about by
icc (#177, partial).  Patch by Erick Tryzelaar.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81106 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-06 08:33:48 +00:00
Daniel Dunbar
f94880b479 Fix a possible crash call setIsInBounds.
- I think there are more instances of this, but I think they are fixed in Dan's
   incoming patch. This one was preventing me from doing a bugpoint reduction
   though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81103 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-06 02:31:36 +00:00
Evan Cheng
8f78a58e14 Revert r80926. It causes loop unswitch assertion and slow down some JIT tests significantly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81101 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-06 02:26:10 +00:00
Daniel Dunbar
92a97a9166 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
2009-09-06 00:11:24 +00:00
Devang Patel
bd1d6a8ce1 Detect VLAs.
Do not use DenseMap operator[] because it inserts new entry if lookup fails. Use find() to check an entry in a DenseMap first.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81058 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-05 00:34:14 +00:00
Devang Patel
905cf5e0bd Ignore malformed global variable debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81055 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-04 23:59:07 +00:00
Devang Patel
68f195cc50 While replacing an MDNode elment, properly update MDNode's operand list.
MDNode's operand list does not include all elements.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81045 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-04 21:32:05 +00:00
Andreas Neustifter
31dcbc3b4a Prevent warnings on compilers for which its not clear that assert won't return.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81044 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-04 21:22:04 +00:00
Lang Hames
8651125d28 Replaces uses of unsigned for indexes in LiveInterval and VNInfo with
a new class, MachineInstrIndex, which hides arithmetic details from
most clients. This is a step towards allowing the register allocator
to update/insert code during allocation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81040 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-04 20:41:11 +00:00
Andreas Neustifter
e8d372e48d Cleaned up ProfileVerifierPass.
(See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090831/086219.html)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81007 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-04 17:15:10 +00:00
Andreas Neustifter
ed1ac4ae8e Converted MaximumSpanningTree algorithm to a generic template, this could go
into llvm/ADT.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81001 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-04 12:34:44 +00:00
Dan Gohman
859fff476d 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
2009-09-04 12:08:11 +00:00