Johnny Chen
beb1238a85
Add VCMP (VFP floating-point compare without 'E' bit set) for disassembly purpose.
...
llvm-svn: 95560
2010-02-08 19:41:48 +00:00
Chris Lattner
38d022efe9
add scaffolding for target-specific MCExprs.
...
llvm-svn: 95559
2010-02-08 19:41:07 +00:00
Duncan Sands
e77bebc4ba
Flesh out the list of predicates, for those who like this style. I was
...
looking for isPointer, and added the rest for uniformity.
llvm-svn: 95557
2010-02-08 19:36:51 +00:00
Daniel Dunbar
ff7e95878f
ImmutableIntervalMap: Fix for unqualified lookup into dependent base class, done
...
by clang's -fixit! :)
llvm-svn: 95551
2010-02-08 18:08:46 +00:00
Johnny Chen
c7e606f132
Added VMOVRRS/VMOVSRR to ARMInstrVFP.td for disassembly purpose.
...
A8.6.331 VMOV (between two ARM core registers and two single-precision registers)
llvm-svn: 95548
2010-02-08 17:26:09 +00:00
Duncan Sands
4583dfc651
Fix some typos.
...
llvm-svn: 95542
2010-02-08 11:03:31 +00:00
Torok Edwin
6e29e9d262
Fix x86 JIT stub on MSVC.
...
Thanks to Kristaps Straupe for noticing the bug.
llvm-svn: 95537
2010-02-08 08:37:27 +00:00
Sanjiv Gupta
bb3f887a85
Fixed build error for redefinition.
...
llvm-svn: 95532
2010-02-08 06:08:32 +00:00
Sanjiv Gupta
b67dc69a78
Add uppercase and lowercase part defines in driver.
...
Use a temp dir with a unique name in the current dir itself.
Use forward_value instead of unpack_values.
llvm-svn: 95530
2010-02-08 05:56:37 +00:00
Nick Lewycky
b1d5ead9fb
Make the destructor for TypeMapBase protected. Spotted by Duncan Sands with
...
cppcheck!
llvm-svn: 95527
2010-02-07 21:13:46 +00:00
Duncan Sands
a1b98ab7d5
Give DwarfPrinter a protected (but not virtual) destructor. Cppcheck
...
warns about this base class not having a virtual destructor, but since
this class has no virtual methods and neither it or the types derived
from it has a destructor, a protected trivial destructor will do (and
shuts cppcheck up) the trick without the cost of introducing a vtable.
llvm-svn: 95526
2010-02-07 21:09:22 +00:00
Bruno Cardoso Lopes
d59cddc098
Add suport for VASTART on Mips.
...
llvm-svn: 95506
2010-02-06 21:00:02 +00:00
Bruno Cardoso Lopes
d6fff557db
First step towards varargs support in Mips:
...
- o32 cc must pass all arguments in A0...A3 and stack regardless
if its type (but respect the alignment).
- Store all variable arguments back to the caller stack.
llvm-svn: 95500
2010-02-06 19:20:49 +00:00
Evan Cheng
ea5c6be766
Run codegen dce pass for all targets at all optimization levels. Previously it's
...
only run for x86 with fastisel. I've found it being very effective in
eliminating some obvious dead code as result of formal parameter lowering
especially when tail call optimization eliminated the need for some of the loads
from fixed frame objects. It also shrinks a number of the tests. A couple of
tests no longer make sense and are now eliminated.
llvm-svn: 95493
2010-02-06 09:07:11 +00:00
Evan Cheng
c72f7882c0
Remove a large test case that (soon will) no longer make sense.
...
llvm-svn: 95492
2010-02-06 09:00:30 +00:00
Bob Wilson
182c53ee88
Fix an uninitialized value. Radar 7609421.
...
llvm-svn: 95488
2010-02-06 05:55:20 +00:00
Rafael Espindola
4536b9a904
Fix alignment on ppc linux. This fixes the build of crtend.o
...
llvm-svn: 95477
2010-02-06 03:32:21 +00:00
Evan Cheng
d064aefefc
Do not emit callseq instructions around sibcalls. This eliminated some unnecessary stack adjustments.
...
llvm-svn: 95475
2010-02-06 03:28:46 +00:00
Dale Johannesen
0a741b7258
Add a Debug bit to MachineOperand, for uses that
...
are from debug info. Add an iterator to MachineRegisterInfo
to skip Debug operands when walking the use list. No
functional change yet.
llvm-svn: 95473
2010-02-06 02:28:32 +00:00
Dale Johannesen
db2eb47835
After Victor's latest commits I am seeing null
...
addresses in dbg.declare; ignore this for the
moment to prevent things from breaking.
llvm-svn: 95471
2010-02-06 02:26:02 +00:00
Victor Hernandez
827de51a4a
Linker should not remap null operands of metadata
...
llvm-svn: 95468
2010-02-06 01:31:55 +00:00
Victor Hernandez
1b08138152
Function-local metadata whose operands had been optimized to no longer refer to function-local IR were not getting written by BitcodeWriter; solution is for these metadata to be enumerated just like global metadata.
...
llvm-svn: 95467
2010-02-06 01:21:09 +00:00
Jakob Stoklund Olesen
74bb06c0f0
Reintroduce the InlineHint function attribute.
...
This time it's for real! I am going to hook this up in the frontends as well.
The inliner has some experimental heuristics for dealing with the inline hint.
When given a -respect-inlinehint option, functions marked with the inline
keyword are given a threshold just above the default for -O3.
We need some experiments to determine if that is the right thing to do.
llvm-svn: 95466
2010-02-06 01:16:28 +00:00
Bob Wilson
a10e65c852
Add a test for my change to disable reassociation for i1 types.
...
llvm-svn: 95465
2010-02-06 01:16:25 +00:00
Devang Patel
6efc8e5120
Set DW_AT_artificial only if argument is marked as artificial.
...
llvm-svn: 95461
2010-02-06 01:02:37 +00:00
Bob Wilson
5638c36efd
Handle AddrMode6 (for NEON load/stores) in Thumb2's rewriteT2FrameIndex.
...
Radar 7614112.
llvm-svn: 95456
2010-02-06 00:24:38 +00:00
Jakob Stoklund Olesen
5f9ead2714
Don't unroll loops containing function calls.
...
llvm-svn: 95454
2010-02-05 23:21:31 +00:00
Jakob Stoklund Olesen
b0b2297066
Update CodeMetrics to count 'big' function calls explicitly.
...
llvm-svn: 95453
2010-02-05 23:21:18 +00:00
Devang Patel
d4be4ced76
Do not generate specification DIE for nested functions.
...
llvm-svn: 95452
2010-02-05 23:09:20 +00:00
Chris Lattner
9d624778a3
fix incorrect encoding of SBB8mi that Kevin noticed.
...
llvm-svn: 95448
2010-02-05 22:56:11 +00:00
Chris Lattner
d91f302a05
fix a case where we'd mis-encode fisttp because of an incorrect (and
...
redundant with a correct one) pattern that was added for the disassembler.
llvm-svn: 95446
2010-02-05 22:49:06 +00:00
Chris Lattner
a60af09414
add note.
...
llvm-svn: 95445
2010-02-05 22:48:33 +00:00
Chris Lattner
d2e879a012
remove fixme
...
llvm-svn: 95444
2010-02-05 22:46:46 +00:00
Chris Lattner
175629608e
print encodings like this:
...
pslld 69, %mm3 ## encoding: [0x0f,0xf2,0x1c,0x25,0x45,0x00,0x00,0x00]
instead of like this:
pslld 69, %mm3 ## encoding: [0x0f,0xf2,0x1c,0x25,0x45,0000,0000,0000]
this only affects 0.
llvm-svn: 95441
2010-02-05 22:20:08 +00:00
Chris Lattner
58827ff98e
port X86InstrInfo::determineREX over to the new encoder.
...
llvm-svn: 95440
2010-02-05 22:10:22 +00:00
Jakob Stoklund Olesen
916f48a054
Teach SimplifyCFG about magic pointer constants.
...
Weird code sometimes uses pointer constants other than null. This patch
teaches SimplifyCFG to build switch instructions in those cases.
Code like this:
void f(const char *x) {
if (!x)
puts("null");
else if ((uintptr_t)x == 1)
puts("one");
else if (x == (char*)2 || x == (char*)3)
puts("two");
else if ((intptr_t)x == 4)
puts("four");
else
puts(x);
}
Now becomes a switch:
define void @f(i8* %x) nounwind ssp {
entry:
%magicptr23 = ptrtoint i8* %x to i64 ; <i64> [#uses=1]
switch i64 %magicptr23, label %if.else16 [
i64 0, label %if.then
i64 1, label %if.then2
i64 2, label %if.then9
i64 3, label %if.then9
i64 4, label %if.then14
]
Note that LLVM's own DenseMap uses magic pointers.
llvm-svn: 95439
2010-02-05 22:03:18 +00:00
Chris Lattner
9c9453e582
wire up 64-bit MCCodeEmitter.
...
llvm-svn: 95438
2010-02-05 21:51:35 +00:00
Chris Lattner
86bd194234
really kill off the last MRMInitReg inst, remove logic from encoder.
...
llvm-svn: 95437
2010-02-05 21:34:18 +00:00
Chris Lattner
e96d534ce0
lower the last of the MRMInitReg instructions in MCInstLower.
...
llvm-svn: 95435
2010-02-05 21:30:49 +00:00
Chris Lattner
90916287ed
teach X86MCInstLower to lower the MOV32r0 and MOV8r0
...
pseudo instructions.
llvm-svn: 95433
2010-02-05 21:21:06 +00:00
Chris Lattner
fd7976a432
genericize helpers, use them for MOV16r0/MOV64r0
...
llvm-svn: 95432
2010-02-05 21:15:57 +00:00
Chris Lattner
340b542f8b
factor code better in X86MCInstLower::Lower, teach it to
...
lower the SETB* instructions.
llvm-svn: 95431
2010-02-05 21:13:48 +00:00
Chris Lattner
64ffd11d49
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
89f7dfff21
implement the rest of the encoding types.
...
llvm-svn: 95414
2010-02-05 19:37:31 +00:00
Chris Lattner
503243559a
move functions for decoding X86II values into the X86II namespace.
...
llvm-svn: 95410
2010-02-05 19:24:13 +00:00
Dan Gohman
4739e41ce9
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
342762fdba
constant propagate a method away.
...
llvm-svn: 95408
2010-02-05 19:20:30 +00:00
Dan Gohman
8abb67df63
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
b8d375fd21
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
37166eb419
add some more encodings.
...
llvm-svn: 95403
2010-02-05 19:04:37 +00:00
Eric Christopher
04371b4f12
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
03a3df1235
Make lit's gtest support honor config.environment.
...
llvm-svn: 95398
2010-02-05 18:09:19 +00:00
Johnny Chen
a778db9a91
VMOVRRD and VMOVDRR both have Inst{7-6} = 0b00.
...
llvm-svn: 95397
2010-02-05 18:04:58 +00:00
Jeffrey Yasskin
31faefff92
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
994da1a479
Make test more fucused eliminating extraneous bits.
...
llvm-svn: 95384
2010-02-05 11:21:05 +00:00
Daniel Dunbar
675ae27e37
MC: Change default comment column to 40 characters.
...
llvm-svn: 95378
2010-02-05 07:32:18 +00:00
Evan Cheng
c8b4db77be
Fix test.
...
llvm-svn: 95373
2010-02-05 06:37:00 +00:00
Chris Lattner
df84b1aa50
implement the non-relocation forms of memory operands
...
llvm-svn: 95368
2010-02-05 06:16:07 +00:00
Evan Cheng
a366c61f77
Handle tail call with byval arguments.
...
llvm-svn: 95351
2010-02-05 02:21:12 +00:00
Chris Lattner
610c84a7c2
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
4f627ba89f
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
3b245876c0
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
6510dc8dc3
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
27dfb1e1a4
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
ee9d33b4e7
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
0a4fa4ca93
Fix typo Duncan noticed.
...
llvm-svn: 95322
2010-02-04 19:07:06 +00:00
Jakob Stoklund Olesen
113fb54bcb
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
c7c89b8325
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
72d36b59be
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
372c7d5f93
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
fb5670fc16
move the PR6214 microoptzn to this file.
...
llvm-svn: 95299
2010-02-04 07:32:01 +00:00
Chris Lattner
f3c6b5008a
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
aeba2250a5
Re-enable x86 tail call optimization.
...
llvm-svn: 95295
2010-02-04 06:47:24 +00:00
Eric Christopher
107a1fbf61
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
8228b11abc
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
21fb024cc0
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
42fa84a880
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
01676f9ff4
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
9946b5109c
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
9976832a05
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
9eb8d6fb43
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
77fe07a93a
Use a tab instead of space after .type, for consistency.
...
llvm-svn: 95272
2010-02-04 01:42:13 +00:00
Dale Johannesen
c337d6538a
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
d44ee35f30
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
f12e18db21
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
e5177e685c
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
c5df1559ca
This test passes now on ppc darwin, so reenable it.
...
llvm-svn: 95264
2010-02-03 22:29:02 +00:00
Dale Johannesen
0c426100d0
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
223084d3ac
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
6794f9b9f6
set up some infrastructure, some minor cleanups.
...
llvm-svn: 95260
2010-02-03 21:43:43 +00:00
Evan Cheng
f4139067ee
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
112a871fe2
Make test less fragile
...
llvm-svn: 95258
2010-02-03 21:39:04 +00:00
Chris Lattner
f914be06d2
stub out a new X86 encoder, which can be tried with
...
-enable-new-x86-encoder until its stable.
llvm-svn: 95256
2010-02-03 21:24:49 +00:00
Chris Lattner
2f750f3b5a
rename createX86MCCodeEmitter to more accurately reflect what it creates.
...
llvm-svn: 95254
2010-02-03 21:14:33 +00:00
Kevin Enderby
00f1e6c030
Added support for X86 instruction prefixes so llvm-mc can assemble them. The
...
Lock prefix, Repeat string operation prefixes and the Segment override prefixes.
Also added versions of the move string and store string instructions without the
repeat prefixes to X86InstrInfo.td. And finally marked the rep versions of
move/store string records in X86InstrInfo.td as isCodeGenOnly = 1 so tblgen is
happy building the disassembler files.
llvm-svn: 95252
2010-02-03 21:04:42 +00:00
Devang Patel
d231689adb
Emit appropriate expression to find virtual base offset.
...
llvm-svn: 95242
2010-02-03 20:08:48 +00:00
Devang Patel
999b499024
Provide interface to identifiy artificial methods.
...
llvm-svn: 95240
2010-02-03 19:57:19 +00:00
Jeffrey Yasskin
099552a0ca
r94686 changed all ModuleProvider parameters to Modules, which made the
...
1-argument ExecutionEngine::create(Module*) ambiguous with the signature that
used to be ExecutionEngine::create(ModuleProvider*, defaulted_params). Fixed
by removing the 1-argument create(). Fixes PR6221.
llvm-svn: 95236
2010-02-03 19:18:04 +00:00
Jeffrey Yasskin
212badaa60
Make docs less specific about their versions, at Chris's suggestion.
...
llvm-svn: 95231
2010-02-03 18:49:55 +00:00
Daniel Dunbar
c0f5f284d4
Add llvm_supports_darwin_and_target to DejaGNU as well, I'd almost forgotten it
...
ever existed. :)
llvm-svn: 95230
2010-02-03 18:43:46 +00:00
Jeffrey Yasskin
696d965708
Mention the version in the documentation index and link to the 2.6 docs, which
...
is what most readers will actually be aiming for.
llvm-svn: 95229
2010-02-03 18:23:23 +00:00
Daniel Dunbar
e3ee332fe0
llvm-mc: Add --show-inst option, for showing the MCInst inline with the assembly
...
output.
llvm-svn: 95227
2010-02-03 18:18:30 +00:00
Dan Gohman
b44d2abc91
Add "Author Date Id Revision" svn:keyword properties to these files, as
...
is done with the other html files in doc, to hopefully keep strings like
"Last modified" current.
llvm-svn: 95225
2010-02-03 17:27:31 +00:00
Bob Wilson
04365c5f72
Adjust the heuristics used to decide when SROA is likely to be profitable.
...
The SRThreshold value makes perfect sense for checking if an entire aggregate
should be promoted to a scalar integer, but it is not so good for splitting
an aggregate into its separate elements. A struct may contain a large embedded
array along with some scalar fields that would benefit from being split apart
by SROA. Even if the total aggregate size is large, it may still be good to
perform SROA. Thus, the most important piece of this patch is simply moving
the aggregate size comparison vs. SRThreshold so that it guards only the
aggregate promotion.
We have also been checking the number of elements to decide if an aggregate
should be split up. The limit of "SRThreshold/4" seemed rather arbitrary,
and I don't think it's very useful to derive this limit from SRThreshold
anyway. I've collected some data showing that the current default limit of
32 (since SRThreshold defaults to 128) is a reasonable cutoff for struct
types. One thing suggested by the data is that distinguishing between structs
and arrays might be useful. There are (obviously) a lot more large arrays
than large structs (as measured by the number of elements and not the total
size -- a large array inside a struct still counts as a single element given
the way we do SROA right now). Out of 8377 arrays where we successfully
performed SROA while compiling a large set of benchmarks, only 16 of them had
more than 8 elements. And, for those 16 arrays, it's not at all clear that
SROA was actually beneficial. So, to offset the compile time cost of
investigating more large structs for SROA, the patch lowers the limit on array
elements to 8.
This fixes Apple Radar 7563690.
llvm-svn: 95224
2010-02-03 17:23:56 +00:00
Garrison Venn
8665bcddec
Repository access test commit
...
llvm-svn: 95221
2010-02-03 12:00:02 +00:00
Zhongxing Xu
f5e0e3c3a7
Remove redundant declaration.
...
llvm-svn: 95213
2010-02-03 09:05:21 +00:00
Zhongxing Xu
dcfa2576b0
Add constructors.
...
llvm-svn: 95212
2010-02-03 09:04:11 +00:00
Chris Lattner
3bcbdb8a28
reapply r95206, this time actually delete the code I'm replacing in the third stub case.
...
llvm-svn: 95209
2010-02-03 06:42:38 +00:00
Chris Lattner
37fad99a05
revert r95206, it is apparently causing bootstrap failure on i386-darwin9
...
llvm-svn: 95208
2010-02-03 06:41:18 +00:00
Chris Lattner
44f7325de5
print instruction encodings with the existing comment facilities,
...
so that llvm-mc -show-encoding prints like this:
hlt ## encoding: [0xf4]
instead of like this:
hlt
# encoding: [0xf4]
llvm-svn: 95207
2010-02-03 06:28:13 +00:00
Chris Lattner
3eef965b06
make the x86 backend emit darwin stubs through mcstreamer
...
instead of textually.
llvm-svn: 95206
2010-02-03 06:21:16 +00:00
Chris Lattner
082f484074
make MachineModuleInfoMachO hold non-const MCSymbol*'s instead
...
of const ones. non-const ones aren't very useful, because you can't
even, say, emit them.
llvm-svn: 95205
2010-02-03 06:18:30 +00:00
Chris Lattner
edcf065a29
change addPassesToEmitFile to return true on failure instead of its input,
...
add -filetype=null for performance testing and remove -filetype=dynlib,
which isn't planned to be implemented.
llvm-svn: 95202
2010-02-03 05:55:08 +00:00
Evan Cheng
27a41d5473
Revert 94937 and move the noreturn check to codegen.
...
llvm-svn: 95198
2010-02-03 03:55:59 +00:00
Sean Callanan
6a6f9cc634
Fixed the disassembler so it accepts multiple
...
instructions on a single line. Also made it a
bit more forgiving when it reports errors.
llvm-svn: 95197
2010-02-03 03:46:41 +00:00
John McCall
df951bddb8
Make APInt::countLeadingZerosSlowCase() treat the contents of padding bits
...
as undefined. Fixes an assertion in APFloat::toString noticed by Dale.
llvm-svn: 95196
2010-02-03 03:42:44 +00:00
Evan Cheng
40905b4302
Allow all types of callee's to be tail called. But avoid automatic tailcall if the callee is a result of bitcast to avoid losing necessary zext / sext etc.
...
llvm-svn: 95195
2010-02-03 03:28:02 +00:00
Jeffrey Yasskin
bf5ce0a6c2
Reconfigure with autoconf-2.60, and fix autoconf.ac to work with that version.
...
llvm-svn: 95191
2010-02-03 02:11:49 +00:00
Chris Lattner
0b78cc2af5
don't emit \n's at the start of X86AsmPrinter::runOnMachineFunction,
...
.o files don't like that.
llvm-svn: 95187
2010-02-03 01:49:49 +00:00
Chris Lattner
f1866ab682
privatize a bunch of methods and move \n printing into them.
...
llvm-svn: 95186
2010-02-03 01:46:05 +00:00
Chris Lattner
aaa1db66a1
rename printMachineInstruction -> EmitInstruction
...
llvm-svn: 95184
2010-02-03 01:41:03 +00:00
Dale Johannesen
a466692552
Reapply 95050 with a tweak to check the register class.
...
llvm-svn: 95183
2010-02-03 01:40:33 +00:00
Chris Lattner
6f1f865fba
print instructions through the mcstreamer.
...
llvm-svn: 95181
2010-02-03 01:16:28 +00:00
Chris Lattner
402a111318
emit instructions through the streamer.
...
llvm-svn: 95180
2010-02-03 01:15:03 +00:00
Chris Lattner
183ef68ef7
Finally eliminate printMCInst and send instructions through
...
the streamer. Demo:
$ cat t.ll
define i32 @test() nounwind {
ret i32 42
}
$ llc t.ll -o -
...
_test:
movl $42, %eax
ret
$ llc t.ll -o t.o -filetype=obj
$ otool -tv t.o
t.o:
(__TEXT,__text) section
_test:
00000000 movl $0x0000002a,%eax
00000005 ret
llvm-svn: 95179
2010-02-03 01:13:25 +00:00
Chris Lattner
996ec840d0
rejigger the world so that EmitInstruction prints the \n at
...
the end of the instruction instead of expecting the caller to
do it. This currently causes the asm-verbose instruction
comments to be on the next line.
llvm-svn: 95178
2010-02-03 01:09:55 +00:00
Chris Lattner
41ad1905c9
sink handling of target-independent machine instrs (other
...
than DEBUG_VALUE :( ) into the target indep AsmPrinter.cpp
file. This allows elimination of the
NO_ASM_WRITER_BOILERPLATE hack among other things.
llvm-svn: 95177
2010-02-03 01:00:52 +00:00
Chris Lattner
dee74e2805
make these less sensitive to asm verbose changes by disabling it for them.
...
llvm-svn: 95175
2010-02-03 00:48:53 +00:00
Dale Johannesen
55e768c99a
Print FPImm a less kludgy way; APFloat.toString seems
...
to have some problems anyway.
llvm-svn: 95171
2010-02-03 00:36:40 +00:00
Bob Wilson
76e8c59509
Fix some comment typos.
...
llvm-svn: 95170
2010-02-03 00:33:21 +00:00
Chris Lattner
249453fff0
pass an instprinter into the AsmPrinter if it is available.
...
llvm-svn: 95168
2010-02-03 00:29:55 +00:00
Chris Lattner
d111bd518d
make any use of the "O" stream in asmprinter print to
...
stderr if in filetype=obj mode. This is a hack, and will
live until dwarf emission and other random stuff that is
not yet going through MCStreamer is upgraded. It only
impacts filetype=obj mode.
llvm-svn: 95166
2010-02-03 00:22:02 +00:00
Eric Christopher
d86233c118
Recommit this, looks like it wasn't the cause.
...
llvm-svn: 95165
2010-02-03 00:21:58 +00:00
Evan Cheng
5f238a9650
ByVal frame object size should be that of the byval argument, not the size of the type which is just a pointer. This is not known to break stuff but is wrong nevertheless.
...
llvm-svn: 95163
2010-02-02 23:58:13 +00:00
Chris Lattner
8856a67e41
Hook up -filetype=obj through the MachO streamer. Here's a demo:
...
$ cat t.ll
@g = global i32 42
$ llc t.ll -o t.o -filetype=obj
$ nm t.o
00000000 D _g
There is still a ton of work left. Instructions are not being encoded
yet apparently.
llvm-svn: 95162
2010-02-02 23:57:42 +00:00
Jim Grosbach
d0a2f52f8f
As of r79039, we still try to eliminate the frame pointer on leaf functions,
...
even when -disable-fp-elim is specified.
llvm-svn: 95161
2010-02-02 23:56:14 +00:00
Evan Cheng
6f36a083ef
Revert 95130.
...
llvm-svn: 95160
2010-02-02 23:55:14 +00:00
Dale Johannesen
b3cfc2b77c
Accept floating point immediates in DEBUG_VALUE.
...
llvm-svn: 95159
2010-02-02 23:54:23 +00:00
Daniel Dunbar
bdbffbedf0
AsmParser/X86: Add temporary hack to allow parsing "sal". Eventually we need
...
some mechanism for specifying alternative syntaxes, but I'm not sure what form
that should take yet.
llvm-svn: 95158
2010-02-02 23:46:47 +00:00
Daniel Dunbar
3b8a4663b9
AsmMatcherEmitter: Use stable_sort when reordering instructions, so that order
...
is still deterministic even amongst ambiguous instructions (eventually ambiguous
match orders will be a hard error, but we aren't there yet).
llvm-svn: 95157
2010-02-02 23:46:36 +00:00
Chris Lattner
c49f8c7456
use OwningPtr and factor code better.
...
llvm-svn: 95156
2010-02-02 23:45:17 +00:00
Chris Lattner
b0d44c3807
refactor code so that LLVMTargetMachine creates the asmstreamer and
...
mccontext instead of having AsmPrinter do it. This allows other
types of MCStreamer's to be passed in.
llvm-svn: 95155
2010-02-02 23:37:42 +00:00
Eric Christopher
e67d01a9a8
Hopefully temporarily revert this.
...
llvm-svn: 95154
2010-02-02 23:01:31 +00:00
Chris Lattner
530c72a65d
simplify getVerboseAsm
...
llvm-svn: 95153
2010-02-02 22:58:13 +00:00
Chris Lattner
32445d300f
move handling of asm-verbose out of AsmPrinter.cpp into LLVMTargetMachine.cpp with the rest of the command line options.
...
llvm-svn: 95152
2010-02-02 22:54:51 +00:00
Chris Lattner
f8928453bc
remove dead #include, stupid symlinks.
...
llvm-svn: 95150
2010-02-02 22:37:42 +00:00
Chris Lattner
73051044fd
remove the # TAILCALL markers, which was causing the to fail.
...
It's unclear if the matcher is nondeterminstic of what here,
but I'm getting matches without TAILCALL and some other hosts
are getting matches with it.
llvm-svn: 95149
2010-02-02 22:36:29 +00:00
Chris Lattner
919b97436e
Remove a bunch of stuff around the edges of the ELF writer.
...
Now the only use of the ELF writer is the JIT, which won't be
easy to fix in the short term. :( :(
llvm-svn: 95148
2010-02-02 22:31:11 +00:00
Eric Christopher
f9553572b7
Reformat my last patch slightly.
...
llvm-svn: 95147
2010-02-02 22:29:26 +00:00
Chris Lattner
f46359642f
tidy some targets.
...
llvm-svn: 95146
2010-02-02 22:13:21 +00:00