Commit Graph

40260 Commits

Author SHA1 Message Date
Anton Korobeynikov
cec36f4c11 Hook in GlobalMerge pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109359 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-24 21:52:08 +00:00
Nick Lewycky
de4e94a18c Revert this because we can't clone cyclic MDNodes which are creating during a
build of llvm-gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109355 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-24 20:54:02 +00:00
Anton Korobeynikov
8c64b9766e Add hook to insert late LLVM=>LLVM passes just before isel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109354 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-24 20:48:54 +00:00
Nick Lewycky
fee12b2985 Whether function-local or not, a MDNode may reference a Function in which case
it needs to be mapped to refer to the function in the new module, not the old
one. Fixes PR7700.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109353 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-24 19:43:25 +00:00
Duncan Sands
ffe8c8871a Clarify that if a new value handle is added while dropping value handles
hanging off a value, then the dropping code will intentionally not drop
it too (since this is almost certainly a bug).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109337 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-24 12:09:22 +00:00
Bob Wilson
f28dd88611 Change ScheduleDAGInstrs::Defs and ::Uses to be variable-size vectors
instead of fixed size arrays, so that increasing FirstVirtualRegister to 16K
won't cause a compile time performance regression.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109330 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-24 06:01:53 +00:00
Devang Patel
2f58485fc8 Use current working directory when Dirname is empty. This only happens when absolute source file path is used on compiler command line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109302 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-24 00:53:22 +00:00
Evan Cheng
70017e44cd Add an ILP scheduler. This is a register pressure aware scheduler that's
appropriate for targets without detailed instruction iterineries.
The scheduler schedules for increased instruction level parallelism in
low register pressure situation; it schedules to reduce register pressure
when the register pressure becomes high.

On x86_64, this is a win for all tests in CFP2000. It also sped up 256.bzip2
by 16%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109300 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-24 00:39:05 +00:00
Bruno Cardoso Lopes
3c8e1bee63 Support x86 "eiz" and "riz" pseudo index registers in the assembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109295 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-24 00:06:39 +00:00
Jim Grosbach
c2723a57f3 Use the appropriate register class for an i32 when adding ARM::LR to the
function live in set. This will give us tGPR for Thumb1 and GPR otherwise,
so the copy will be spillable. rdar://8224931

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109293 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-23 23:50:35 +00:00
Jim Grosbach
734738d3bd Remove too-strict assertion. We may want the vreg copy of the physical register
to be of a different register class. For example, in Thumb1 if the live-in is
a high register, we want the vreg to be a low register. rdar://8224931

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109291 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-23 23:48:02 +00:00
Devang Patel
5f2f69b648 Revert r109262.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109285 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-23 23:04:41 +00:00
Dale Johannesen
8086d5800d Revert 109076. It is wrong and was causing regressions. Add some
comments explaining why it was wrong.  8225024.

Fix the real problem in 8213383: the code that splits very large
blocks when no other place to put constants can be found was not
considering the case that the block contained a Thumb tablejump.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109282 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-23 22:50:23 +00:00
Evan Cheng
3144687df7 - Allow target to specify when is register pressure "too high". In most cases,
it's too late to start backing off aggressive latency scheduling when most
  of the registers are in use so the threshold should be a bit tighter.
- Correctly handle live out's and extract_subreg etc.
- Enable register pressure aware scheduling by default for hybrid scheduler.
  For ARM, this is almost always a win on # of instructions. It's runtime
  neutral for most of the tests. But for some kernels with high register
  pressure it can be a huge win. e.g. 464.h264ref reduced number of spills by
  54 and sped up by 20%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109279 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-23 22:39:59 +00:00
Bruno Cardoso Lopes
f64a7d49a0 Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109276 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-23 22:15:26 +00:00
Dan Gohman
f8336a75c2 Eliminate getCanonicalInductionVariableIncrement's last user and
eliminate it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109270 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-23 21:34:51 +00:00
Dan Gohman
63137d5681 Simplify this code; it can use the regular CFG utlities rather than
the BlockTraits abstractions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109268 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-23 21:25:16 +00:00
Dan Gohman
304a7a6242 Micro-optimize SCEVComplexityCompare.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109267 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-23 21:20:52 +00:00
Dan Gohman
e72079ac69 Add a const qualifier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109266 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-23 21:18:55 +00:00
Dan Gohman
cd20c6fb18 Use the proper type for shift counts. This fixes a bootstrap error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109265 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-23 21:08:12 +00:00
Devang Patel
f83f42599d IF directory name is empty then try to extract one using absolute file name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109262 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-23 20:36:13 +00:00
Bruno Cardoso Lopes
f528d2b438 Add AVX version of CLMUL instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109248 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-23 18:41:12 +00:00
Dan Gohman
a4f4d699ec DAGCombine (shl (anyext x, c)) to (anyext (shl x, c)) if the high bits
are not demanded. This often allows the anyext to be folded away.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109242 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-23 18:03:30 +00:00
Dan Gohman
7c98283f0e Make SDNode::dump() print a newline at the end.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109234 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-23 16:37:47 +00:00
Gabor Greif
04577efaf2 fix constness warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109224 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-23 13:28:47 +00:00
Gabor Greif
9843688f97 do not (implicitly) dereference iterator many times, cache it instead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109222 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-23 10:23:01 +00:00
Mikhail Glushenkov
b2721e70df Formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109216 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-23 04:19:34 +00:00
Mikhail Glushenkov
b374d4fd82 Get rid of exceptions in llvmc.
llvmc can be now compiled with llvm-gcc on Windows.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109215 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-23 03:42:55 +00:00
Bruno Cardoso Lopes
26a9142bd6 Declare CLMUL as a subtarget feature
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109207 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-23 01:22:45 +00:00
Bruno Cardoso Lopes
cdae7e8244 Add x86 CLMUL (Carry-less multiplication) cpu feature
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109206 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-23 01:17:51 +00:00
Eric Christopher
54e1791e4b 80-col.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109205 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-23 01:05:59 +00:00
Bruno Cardoso Lopes
6b7e9168a4 Add complete assembler support for FMA3 instructions, with descriptions and encodings taken from the AVX manual
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109204 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-23 00:54:35 +00:00
Dale Johannesen
c76d23f2e2 The only supported calling convention for X86-64 uses
SSE, so we can't return floating point values if this
is disabled.  Detect this error for clang.

With SSE1 only, f64 is a problem; it can be done, but
neither llvm-gcc nor clang has ever generated correct
code for it.  Since nobody noticed this I think it's
OK to treat it as an error for now.

This also handles SSE-sized vectors of floating point.
8207686, 8204109.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109201 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-23 00:30:35 +00:00
Bruno Cardoso Lopes
06e6e101a0 Fix some AVX instructions which didnt had HasAVX prefix. And also a problem with PINSRW, which was totally wrong because of a typo I introduced previously
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109198 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-23 00:14:54 +00:00
Chris Lattner
2062875a7d eliminate the TargetInstrInfo::GetInstSizeInBytes hook.
ARM/PPC/MSP430-specific code (which are the only targets that
implement the hook) can directly reference their target-specific
instrinfo classes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109171 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22 21:27:00 +00:00
Chris Lattner
77beeaec1e remove the dwarf sizing stuff which is now dead, it was
"yet another" copy of the dwarf EH emission code that was
copied, pasted and slightly hacked up.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109169 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22 21:20:39 +00:00
Bruno Cardoso Lopes
fb583a9842 Add remaining AVX instructions (most of them dealing with GR64 destinations. This complete the assembler support for the general AVX ISA. But we still miss instructions from FMA3 and CLMUL specific feature flags, which are now the next step
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109168 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22 21:18:49 +00:00
Chris Lattner
134d8eec87 remove the JIT "NeedsExactSize" feature and supporting logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109167 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22 21:17:55 +00:00
Chris Lattner
1c55386dae switch a private implementation of GetFunctionSizeInBytes.
This is probably not the best way to implement "Force LR to 
be spilled if the Thumb function size is > 2048." do this, 
it should use the branch shortening infrastructure, but I'm
just preserving functionality here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109165 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22 21:14:33 +00:00
Chris Lattner
0123c1da35 X86MCInstLower now depends on AsmPrinter being around.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109154 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22 21:10:04 +00:00
Chris Lattner
456fdaf0ce instead of migrating it to the MC instruction encoder, just
rip out the implementation of X86InstrInfo::GetInstSizeInBytes.
The code being ripped out just implemented a copy and hacked up
version of the (old) instruction encoder, and is buggy and 
terrible in other ways.  Since "GetInstSizeInBytes" is really 
only there to support the JIT's "NeedsExactSize" hook (which
noone is using), just rip out the code.  I will rip out the
NeedsExactSize hook next.

This resolves rdar://7617809 - switch X86InstrInfo::GetInstSizeInBytes to use X86MCCodeEmitter



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109149 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22 21:05:13 +00:00
Devang Patel
169c932759 Speculatively revert 109117
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109132 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22 18:44:00 +00:00
Xerxes Ranby
99ccffe87e ARMv4 JIT forgets to set the lr register when making a indirect function call. Fixes PR7608
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109125 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22 17:28:34 +00:00
Gabor Greif
481c4c0734 keep in 80 cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109122 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22 17:18:03 +00:00
Devang Patel
bd68d42843 Map MDNode correctly.
A non function local MDNode can have an operand which is cloned by MapValue(). 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109117 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22 16:35:00 +00:00
Gabor Greif
f95eef695d use cascading operator-> feature
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109104 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22 13:49:27 +00:00
Gabor Greif
96f1d8ebdd mass elimination of reliance on automatic iterator dereferencing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109103 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22 13:36:47 +00:00
Gabor Greif
945f1ab0a5 simplify
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109101 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22 13:07:39 +00:00
Gabor Greif
efdf039aec do not access arguments via low-level interface, do not multiply dereference use_iterators
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109100 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22 13:04:32 +00:00
Gabor Greif
85e01df73d pass dereferenced iterator to dyn_cast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109099 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22 11:48:35 +00:00