Chris Lattner
44965f1107
fix logical-select to invoke filecheck right, and fix hte instcombine
...
xform it is checking to actually pass. There is no need to match
m_SelectCst<0, -1> since instcombine canonicalizes that into not(sext).
Add matches for sext(not(x)) in addition to not(sext(x)).
llvm-svn: 95420
2010-02-05 19:53:02 +00:00
Chris Lattner
3590276566
implement the rest of the encoding types.
...
llvm-svn: 95414
2010-02-05 19:37:31 +00:00
Chris Lattner
a6d9d45f42
move functions for decoding X86II values into the X86II namespace.
...
llvm-svn: 95410
2010-02-05 19:24:13 +00:00
Dan Gohman
96cad72d2d
Implement releaseMemory in CodeGenPrepare and free the BackEdges
...
container data. This prevents it from holding onto dangling
pointers and potentially behaving unpredictably.
llvm-svn: 95409
2010-02-05 19:24:11 +00:00
Chris Lattner
326cf88352
constant propagate a method away.
...
llvm-svn: 95408
2010-02-05 19:20:30 +00:00
Dan Gohman
8142ba6bbb
Use a SmallSetVector instead of a SetVector; this code showed up as a
...
malloc caller in a profile.
llvm-svn: 95407
2010-02-05 19:20:15 +00:00
Chris Lattner
d43a7714c9
change getSizeOfImm and getBaseOpcodeFor to just take
...
TSFlags directly instead of a TargetInstrDesc.
llvm-svn: 95405
2010-02-05 19:16:26 +00:00
Chris Lattner
f20e6a05bd
add some more encodings.
...
llvm-svn: 95403
2010-02-05 19:04:37 +00:00
Eric Christopher
f89979ce6a
Remove this code for now. I have a better idea and will rewrite with
...
that in mind.
llvm-svn: 95402
2010-02-05 19:04:06 +00:00
Jeffrey Yasskin
d0d363d1a9
Make lit's gtest support honor config.environment.
...
llvm-svn: 95398
2010-02-05 18:09:19 +00:00
Johnny Chen
0b398e3919
VMOVRRD and VMOVDRR both have Inst{7-6} = 0b00.
...
llvm-svn: 95397
2010-02-05 18:04:58 +00:00
Jeffrey Yasskin
1604115c5a
Move --march, --mcpu, and --mattr from JIT/TargetSelect.cpp to lli.cpp.
...
llc.cpp also defined these flags, meaning that when I linked all of LLVM's
libraries into a single shared library, llc crashed on startup with duplicate
flag definitions. This patch passes them through the EngineBuilder into
JIT::selectTarget().
llvm-svn: 95390
2010-02-05 16:19:36 +00:00
Bill Wendling
c3f4101cc6
Make test more fucused eliminating extraneous bits.
...
llvm-svn: 95384
2010-02-05 11:21:05 +00:00
Daniel Dunbar
96bc973155
MC: Change default comment column to 40 characters.
...
llvm-svn: 95378
2010-02-05 07:32:18 +00:00
Evan Cheng
4b03f55de1
Fix test.
...
llvm-svn: 95373
2010-02-05 06:37:00 +00:00
Chris Lattner
c59cbacb06
implement the non-relocation forms of memory operands
...
llvm-svn: 95368
2010-02-05 06:16:07 +00:00
Evan Cheng
81dde4c7f7
Handle tail call with byval arguments.
...
llvm-svn: 95351
2010-02-05 02:21:12 +00:00
Chris Lattner
adf475aaf7
start adding MRMDestMem, which requires memory form mod/rm encoding
...
to start limping.
llvm-svn: 95350
2010-02-05 02:18:40 +00:00
Chris Lattner
f1f355c706
Add a few more encodings, we can now encode all of:
...
pushl %ebp
movl %esp, %ebp
movl $42, %eax
popl %ebp
ret
llvm-svn: 95344
2010-02-05 01:53:19 +00:00
Evan Cheng
94fe5501b7
When the scheduler unfold a load folding instruction it move some of the predecessors to the unfolded load. It decides what gets moved to the load by checking whether the new load is using the predecessor as an operand. The check neglects the cases whether the predecessor is a flagged scheduling unit.
...
rdar://7604000
llvm-svn: 95339
2010-02-05 01:27:11 +00:00
Bill Wendling
9761f067f8
An empty global constant (one of size 0) may have a section immediately
...
following it. However, the EmitGlobalConstant method wasn't emitting a body for
the constant. The assembler doesn't like that. Before, we were generating this:
.zerofill __DATA, __common, __cmd, 1, 3
This fix puts us back to that semantic.
llvm-svn: 95336
2010-02-05 00:17:02 +00:00
Bob Wilson
c7e8107ff2
Do not reassociate expressions with i1 type. SimplifyCFG converts some
...
short-circuited conditions to AND/OR expressions, and those expressions
are often converted back to a short-circuited form in code gen. The
original source order may have been optimized to take advantage of the
expected values, and if we reassociate them, we change the order and
subvert that optimization. Radar 7497329.
llvm-svn: 95333
2010-02-04 23:32:37 +00:00
Evan Phoenix
a44be8b7f3
Disable external stubs for X86-32 and X86-64
...
Instruction selection for X86 now can choose an instruction
sequence that will fit any address of any symbol, no matter
the pointer width. X86-64 uses a mov+call-via-reg sequence
for this.
llvm-svn: 95323
2010-02-04 19:56:59 +00:00
Evan Cheng
ce5962aaf9
Fix typo Duncan noticed.
...
llvm-svn: 95322
2010-02-04 19:07:06 +00:00
Jakob Stoklund Olesen
54b09bc819
Increase inliner thresholds by 25.
...
This makes the inliner about as agressive as it was before my changes to the
inliner cost calculations. These levels give the same performance and slightly
smaller code than before.
llvm-svn: 95320
2010-02-04 18:48:20 +00:00
Jakob Stoklund Olesen
d72e82107d
Fix small bug in handling instructions with more than one implicitly defined operand.
...
ProcessImplicitDefs would only mark one operand per instruction with <undef>.
This fixed PR6086.
llvm-svn: 95319
2010-02-04 18:46:28 +00:00
Benjamin Kramer
707c8c5e00
Get the LLVMC tests working with clang++ by removing the problematic CXXFLAG in lit.
...
llvm-svn: 95318
2010-02-04 18:40:11 +00:00
Torok Edwin
37e451649c
New flag for GenLibDeps, and llvm-config-perobjincl.
...
This allows to show the explicit files that need to be built/linked to get an
LLVM component.
llvm-svn: 95300
2010-02-04 09:31:35 +00:00
Chris Lattner
a635219775
move the PR6214 microoptzn to this file.
...
llvm-svn: 95299
2010-02-04 07:32:01 +00:00
Chris Lattner
43030eddcd
fix a broken archive that was breaking dejagnu only (not lit)
...
after r95292
llvm-svn: 95296
2010-02-04 07:11:08 +00:00
Evan Cheng
f5ee7fb571
Re-enable x86 tail call optimization.
...
llvm-svn: 95295
2010-02-04 06:47:24 +00:00
Eric Christopher
ee4a176739
Temporarily revert this since it appears to have caused a build
...
failure.
llvm-svn: 95294
2010-02-04 06:41:27 +00:00
Chris Lattner
e43007d443
add support for the sparcv9-*-* target triple to turn on
...
64-bit sparc codegen. Patch by Nathan Keynes!
llvm-svn: 95293
2010-02-04 06:34:01 +00:00
Chris Lattner
eabd2085d7
From PR6228:
...
"Attached patch removes the extra NUL bytes from the output and changes
test/Archive/MacOSX.toc from a binary to a text file (removes
svn:mime-type=application/octet-stream and adds svn:eol-style=native). I can't
figure out how to get SVN to include the new contents of the file in the patch
so I'm attaching it separately."
Patch by James Abbatiello!
llvm-svn: 95292
2010-02-04 06:19:43 +00:00
Eric Christopher
9b3e42f09e
Rework constant expr and array handling for objectsize instcombining.
...
Fix bugs where we would compute out of bounds as in bounds, and where
we couldn't know that the linker could override the size of an array.
Add a few new testcases, change existing testcase to use a private
global array instead of extern.
llvm-svn: 95283
2010-02-04 02:55:34 +00:00
Evan Cheng
3c93245a64
It's too risky to eliminate sext / zext of call results for tail call optimization even if the caller / callee attributes completely match. The callee may have been bitcast'ed (or otherwise lied about what it's doing).
...
llvm-svn: 95282
2010-02-04 02:45:02 +00:00
Dan Gohman
be6cf8cfb0
Change the argument to getIntegerSCEV to be an int64_t, rather
...
than int. This will make it more convenient for LSR, which does
a lot of things with int64_t offsets.
llvm-svn: 95281
2010-02-04 02:43:51 +00:00
Evan Cheng
c603f314de
Indirect tail call has to go through a call preserved register since it's after callee register pops. X86 isel lowering is using EAX / R11 and it was somehow adding that to function live out. That prevented the real function return register from being added to the function live out list and bad things happen.
...
This fixes 483.xalancbmk (with tail call opt).
llvm-svn: 95280
2010-02-04 02:40:39 +00:00
Sean Callanan
7662f4139b
Filled in a few new APIs for the enhanced
...
disassembly library that provide access to
instruction information, and fixed ambiguous
wording in the comments for the header.
llvm-svn: 95274
2010-02-04 01:43:08 +00:00
Dan Gohman
05d47a0cf5
Use a tab instead of space after .type, for consistency.
...
llvm-svn: 95272
2010-02-04 01:42:13 +00:00
Dale Johannesen
b9cb5e72fd
Rewrite FP constant handling in DEBUG_VALUE yet
...
again, so it more or less handles long double.
Restore \n removed in latest MC frenzy.
llvm-svn: 95271
2010-02-04 01:33:43 +00:00
Victor Hernandez
28f795182c
Fix (and test) function-local metadata that occurs before the instruction that it refers to; fix is to not enumerate operands of function-local metadata until after all instructions have been enumerated
...
llvm-svn: 95269
2010-02-04 01:13:08 +00:00
Eric Christopher
fe6ab1518e
If we're dealing with a zero-length array, don't lower to any
...
particular size, we just don't know what the length is yet.
llvm-svn: 95266
2010-02-03 23:56:07 +00:00
Dale Johannesen
c413673047
This test passes now on ppc darwin; if it doesn't pass
...
on some other ppc say something on the list.
llvm-svn: 95265
2010-02-03 22:33:17 +00:00
Dale Johannesen
0a85fd105b
This test passes now on ppc darwin, so reenable it.
...
llvm-svn: 95264
2010-02-03 22:29:02 +00:00
Dale Johannesen
ddc82307fa
Debugging is now reenabled on PPC darwin, so reenable
...
these tests (they pass).
llvm-svn: 95263
2010-02-03 22:24:49 +00:00
Chris Lattner
26cf12e3c9
enhance new encoder to support prefixes + RawFrm
...
instructions with no operands. It can now handle
define void @test2() nounwind { ret void }
llvm-svn: 95261
2010-02-03 21:57:59 +00:00
Chris Lattner
5078a382e4
set up some infrastructure, some minor cleanups.
...
llvm-svn: 95260
2010-02-03 21:43:43 +00:00
Evan Cheng
5c8b1b9164
Speculatively disable x86 automatic tail call optimization while we track down a self-hosting issue.
...
llvm-svn: 95259
2010-02-03 21:40:40 +00:00
Evan Cheng
ccbbdfa8c4
Make test less fragile
...
llvm-svn: 95258
2010-02-03 21:39:04 +00:00