Commit Graph

25193 Commits

Author SHA1 Message Date
Owen Anderson
95dad830bb Add an option to enable StrongPHIElimination, for ease of testing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57259 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-07 20:22:28 +00:00
Jim Grosbach
3341262de2 Encode the conditional execution predicate when JITing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57258 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-07 19:05:35 +00:00
Dale Johannesen
2cb48eaeb8 Model hardwired inputs & outputs of x86 8-bit divides correctly.
Fixes local RA miscompilation of gcc.c-torture/execute/20020904-1.c -O0.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57257 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-07 18:54:28 +00:00
Andrew Lenharth
2163ca11d5 Use Dan's supperior check
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57255 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-07 18:27:23 +00:00
Andrew Lenharth
82cf32e5ef Correctly set attributes when removing args during cloning. Fixes PR2765
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57254 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-07 18:08:38 +00:00
Jim Grosbach
9e729a2de5 Clarify naming and correct conditional so that CMP and CMN instructions get the Rn operand encoded properly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57252 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-07 17:42:09 +00:00
Jim Grosbach
17a415a4f2 Fix Opcode values of CMP and CMN
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57251 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-07 17:40:46 +00:00
Andrew Lenharth
ff75d9edbb No need for |=
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57249 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-07 17:11:29 +00:00
Andrew Lenharth
1ad0c8201b Use ADDC if it is valid at any smaller size. Do it right this time
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57248 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-07 17:09:16 +00:00
Andrew Lenharth
5c9cc1392c Use ADDC if it is valid at any smaller size. fixes test/Codegen/Generic/i128-addsub.ll on x86
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57247 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-07 17:03:15 +00:00
Anders Carlsson
ae436cecca Certain patterns involving the "movss" instruction were marked as requiring SSE2, when in reality movss is an SSE1 instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57246 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-07 16:14:11 +00:00
Andrew Lenharth
40d513960a Expand arith on machines without carry flags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57243 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-07 14:15:42 +00:00
Andrew Lenharth
1b19ef0295 Note that ADDC and company don't actually expand yet (missing in legalize
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57226 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-07 02:10:26 +00:00
Dale Johannesen
e4a4245906 Mark negative-zero-to-int conversion as Inexact,
since -0.0 can't be represented as an int.
This prevents llvm from reducing -0.0 to a
load-and-convert of int 0.  Fixes
ieee.exp/mzero[2356].c in gcc testsuite.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57224 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-07 00:40:01 +00:00
Dan Gohman
b5cc34d098 Correctly handle calls with no return values. This fixes
2006-01-23-UnionInit on x86-64 when inlining is not enabled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57223 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-07 00:12:37 +00:00
Devang Patel
d44b7c1b07 Fix typo, fix PR 2865.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57221 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-06 23:22:54 +00:00
Dale Johannesen
2df5eec2ff Be more precise about which conversions of NaNs
are Inexact.  (These are not Inexact as defined
by IEEE754, but that seems like a reasonable way
to abstract what happens:  information is lost.)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57218 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-06 22:59:10 +00:00
Evan Cheng
882cdfde51 Fix PR2850 and PR2863. Only generate movddup for 128-bit SSE vector shuffles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57210 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-06 21:13:08 +00:00
Dale Johannesen
65609f2efa Temporarily revert functionality change from my previous patch;
it is too aggressive.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57203 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-06 20:43:48 +00:00
Devang Patel
617fddf51c Remove interfaces implemented by dead pass from the list of available passes.
Patch By Matthijs Kooijman.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57202 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-06 20:36:36 +00:00
Dale Johannesen
d3d8ce3aba Mark shortening NaN conversions as Inexact. PR 2856.
Improve description of unsupported formats.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57185 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-06 18:22:29 +00:00
Devang Patel
e76225a4c1 It is possible that all functions in one module are not being
optimized for size. Set OptForSize for each function separately.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57182 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-06 18:03:39 +00:00
Dan Gohman
4daa9071ed Don't dereference the end() iterator. Thanks to
ENABLE_EXPENSIVE_CHECKS for finding this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57181 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-06 18:00:07 +00:00
Devang Patel
e4d4b8c533 Remove unncessary isDeclaration() checks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57179 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-06 17:30:07 +00:00
Matthijs Kooijman
5fac55fafb Allow scalarrepl to treat an all-zero GEP just as bitcast.
This includes not marking a GEP involving a vector as unsafe, but only when it
has all zero indices. This allows scalarrepl to work in a few more cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57177 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-06 16:23:31 +00:00
Chris Lattner
d20a00d011 reorder #include order, patch by Kenneth Boyd!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57148 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-06 03:54:25 +00:00
Chris Lattner
78129446ca Add #include to get alloca, patch by Kenneth Boyd!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57147 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-06 03:53:16 +00:00
Chris Lattner
834eb40f44 fix an incorrect and extremely confusing error message
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57123 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-05 18:24:03 +00:00
Chris Lattner
9a6cb15980 make the autoupgrade code for ret attributes dramatically simpler
and actually work.  We can now read the llvm 2.3 bc file from PR2849



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57122 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-05 18:22:09 +00:00
Nuno Lopes
8a88a37b16 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57114 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-05 16:49:34 +00:00
Nuno Lopes
d0ad67788d clean ArgTypeListI production: free the PATypeHolder
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57113 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-05 16:49:03 +00:00
Anton Korobeynikov
ff4ca2e088 Emit type-correct constant null. Also fix a typo.
Patch by Robert G. Jakabosky!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57110 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-05 15:07:06 +00:00
Anton Korobeynikov
6381a1334a Fix weird think-o and unbreak build on all gcc-3.4.x-based platforms (e.g. mingw)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57106 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-05 08:53:29 +00:00
Chris Lattner
b1ac769873 this case is matched now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57096 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-05 02:16:12 +00:00
Chris Lattner
8c34cd287a rewrite bswap matching to be more general, allowing arbitrary
shifting and masking inside a bswap expr.  This allows it to handle
the cases from PR2842, which involve the intermediate 'or' 
expressions being shifted, not just the input value.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57095 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-05 02:13:19 +00:00
Chris Lattner
2f63ca3fa8 fix a bug where the bswap matcher could match a case involving
ashr.  It should only apply to lshr.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57089 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-05 00:50:57 +00:00
Chris Lattner
31d7161206 wrap some long lines and expand i32 mul's to libcalls, inspired by a
patch by Mikael Lepisto!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57077 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-04 21:27:46 +00:00
Oscar Fuentes
80533040bc CMake: Reflected changes on source file structure. New plugin support
for llvmc2 incomplete.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57076 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-04 21:18:50 +00:00
Duncan Sands
c82b6a1ed2 Ignore loads from and stores to local memory (i.e. allocas)
when deciding whether to mark a function readnone/readonly.
Since the pass is currently run before SROA, this may be
quite helpful.  Requested by Chris on IRC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57050 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-04 13:24:24 +00:00
Nick Lewycky
26e4b216c0 Allow the construction of SCEVs with SCEVCouldNotCompute operands, by
implementing folding. Fixes PR2857.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57049 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-04 11:19:07 +00:00
Anton Korobeynikov
c4e8bec703 Revert r56675 - it breaks unwinding runtime everywhere.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57048 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-04 11:09:36 +00:00
Argyrios Kyrtzidis
c8a07733d3 Add implementations for sys::Memory::setWritable and sys::Memory::setExecutable on Win32 platform.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57047 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-04 08:15:32 +00:00
Argyrios Kyrtzidis
0304b87cce Fix compilation error on MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57046 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-04 08:11:49 +00:00
Dan Gohman
241f464d24 Fix fast-isel's handling of atomic instructions. They may
expand to multiple basic blocks, in which case fast-isel
needs to informed of which block to use as it resumes
inserting instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57040 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-04 00:56:36 +00:00
Dan Gohman
022b21ff7c Fix a bug in the local allocator's liveness computation where it
was setting kill flags on tied uses in two-address instructions.
The kill flags were causing the allocator to think it could
allocate the use and its tied def in different registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57039 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-04 00:31:14 +00:00
Dale Johannesen
880ae364ba Make atomic Swap work, 64-bit on x86-32.
Make it all work in non-pic mode.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57034 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-03 22:25:52 +00:00
Dan Gohman
792e1e92c7 Clean up some multiple-return-value code that is no longer
applicable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57033 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-03 22:21:24 +00:00
Devang Patel
3afba0ae41 Fix function attribute verification check.
Thanks Duncan!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57029 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-03 21:11:02 +00:00
Dale Johannesen
1b54c7fe9b Pass MemOperand through for 64-bit atomics on 32-bit,
incidentally making the case where the memop is a
pointer deref work.  Fix cmp-and-swap regression.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57027 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-03 19:41:08 +00:00
Devang Patel
20da1f07da Nick Lewycky's patch.
While hosting instruction check PHI node.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57025 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-03 18:57:37 +00:00