Duncan Sands
57f1191b0d
Check that P is not zero initialized.
...
llvm-svn: 98627
2010-03-16 11:36:35 +00:00
Gabor Greif
86ca5493f7
add single return tests
...
llvm-svn: 98625
2010-03-16 11:24:53 +00:00
Gabor Greif
35a9b8baeb
fix PR6589
...
adjusted unittest
I have added some doxygen to OptionalOperandTraits,
so hopefully there will be no confusion in the future.
Incidentally OptionalOperandTraits is not used any more (IIUC),
but the obvious client would be BranchInstr, and I plan
to rearrange it that way.
llvm-svn: 98624
2010-03-16 10:59:48 +00:00
Gabor Greif
155803840b
begin humbly with a repro of PR6589
...
llvm-svn: 98623
2010-03-16 09:55:46 +00:00
Chris Lattner
fd381328ff
add support for bugpointing the integrated assembler. Something like this
...
works for me: bugpoint Output/bisort.llvm.bc -run-llc-ia -safe-run-llc
This uses llc with the integrated assembler as the test compiler and llc
without it as the safe compiler.
llvm-svn: 98618
2010-03-16 06:41:47 +00:00
Chris Lattner
cf910439ee
fix the same bug on the x86-64 side of the fence.
...
llvm-svn: 98616
2010-03-16 06:39:08 +00:00
Chris Lattner
f5fec8fd8d
fix the encoding of TAILJMPd. This fixes Benchmarks/Olden/bisort
...
with the integrated assembler!
llvm-svn: 98615
2010-03-16 06:30:18 +00:00
Jeffrey Yasskin
7d83d9b23c
Avoid a memory leak in JITDebugRegisterer.
...
llvm-svn: 98612
2010-03-16 05:54:54 +00:00
Bob Wilson
5125770346
Add a testcase for the change in r98586.
...
llvm-svn: 98610
2010-03-16 05:33:29 +00:00
Bill Wendling
e03ecd01aa
Use getFirstTerminator().
...
llvm-svn: 98604
2010-03-16 02:01:51 +00:00
Bill Wendling
31d7f0d96a
Forgot testcase for r98599.
...
llvm-svn: 98602
2010-03-16 01:54:20 +00:00
Bill Wendling
a8f54f032d
When checking if something's killed, don't rely simply on whether it's marked as
...
"used outside of the block". If the block ends in a return, then it won't be
used outside of it.
llvm-svn: 98599
2010-03-16 01:05:35 +00:00
Chris Lattner
f57437abb1
don't form a RecordChild or CheckChildType for child #'s over 7, we don't
...
have enums for them.
llvm-svn: 98597
2010-03-16 00:35:11 +00:00
Bob Wilson
ba75e81644
Wrap a long line and add some parens to be consistent.
...
llvm-svn: 98596
2010-03-16 00:31:15 +00:00
Chris Lattner
db035a0af2
Fix the third (and last known) case of code update problems due
...
to LLVM IR changes with addr label weirdness. In the testcase, we
generate references to the two bb's when codegen'ing the first
function:
_test1: ## @test1
leaq Ltmp0(%rip), %rax
..
leaq Ltmp1(%rip), %rax
Then continue to codegen the second function where the blocks
get merged. We're now smart enough to emit both labels, producing
this code:
_test_fun: ## @test_fun
## BB#0: ## %entry
Ltmp1: ## Block address taken
Ltmp0:
## BB#1: ## %ret
movl $-1, %eax
ret
Rejoice.
llvm-svn: 98595
2010-03-16 00:29:39 +00:00
Daniel Dunbar
5599256415
MC: Allow modifiers in MCSymbolRefExpr, and eliminate X86MCTargetExpr.
...
- Although it would be nice to allow this decoupling, the assembler needs to be able to reason about MCSymbolRefExprs in too many places to make this viable. We can use a target specific encoding of the variant if this becomes an issue.
- This patch also extends llvm-mc to support parsing of the modifiers, as opposed to lumping them in with the symbol.
llvm-svn: 98592
2010-03-15 23:51:06 +00:00
Dan Gohman
c6ddebd6d1
Recognize code for doing vector gather/scatter index calculations with
...
32-bit indices. Instead of shuffling each element out of the index vector,
when all indices are needed, just store the input vector to the stack and
load the elements out.
llvm-svn: 98588
2010-03-15 23:23:03 +00:00
Bob Wilson
3f2293bc02
Translate "cc" clobber in ARM inline assembly to ARM::CCRRegisterClass.
...
Radar 7459078.
llvm-svn: 98586
2010-03-15 23:09:18 +00:00
Devang Patel
45c1505bf6
Skip debug info intrinsics.
...
llvm-svn: 98584
2010-03-15 22:23:03 +00:00
Daniel Dunbar
fe8d866fc7
MC/Mach-O/x86_64: Temporary labels in cstring sections require symbols (and external relocations, but we don't have x86_64 relocations yet).
...
llvm-svn: 98583
2010-03-15 21:56:50 +00:00
Daniel Dunbar
232dc953ac
MC/Mach-O: Add MCSectionMachO::getType()
...
llvm-svn: 98582
2010-03-15 21:56:38 +00:00
Devang Patel
b21991c4f5
Skip debug info intrinsics.
...
llvm-svn: 98581
2010-03-15 21:25:29 +00:00
Bill Wendling
bbcaa40227
Now that the default for Darwin platforms is to place the LSDA into the TEXT
...
section, remove the target-specific code that performs this.
llvm-svn: 98580
2010-03-15 21:09:38 +00:00
Chris Lattner
561334a81f
Implement support for the case when a reference to a addr-of-bb
...
label is generated, but then the block is deleted. Since the
value is undefined, we just emit the label right after the entry
label of the function. It might matter that the label is in the
same section as the function was afterall.
llvm-svn: 98579
2010-03-15 20:39:00 +00:00
Chris Lattner
c116a8707a
use Mang->getSymbol()
...
llvm-svn: 98578
2010-03-15 20:37:57 +00:00
Chris Lattner
2ea586b8f5
use Mang->getSymbol() more.
...
llvm-svn: 98577
2010-03-15 20:37:38 +00:00
Douglas Gregor
6d7d7b5197
Extend MemoryBuffer::getFile() to take an optional "stat" structure
...
pointer. If given, the structure will be set with the stat information from
the file actually read.
llvm-svn: 98575
2010-03-15 20:32:14 +00:00
Devang Patel
f2bce7cbae
Create SDDbgValue for dbg_value intrinsics and remember its connections with DAG nodes.
...
This is a work in progress. Patch by Dale Johannesen!
llvm-svn: 98568
2010-03-15 19:15:44 +00:00
Chris Lattner
347a0eb85c
Fix the case when a reference to an address taken BB is emitted in one
...
function, then the BB is RAUW'd before the definition is emitted. There
are still two cases not being handled, but this should improve us back to
the situation before I touched anything.
llvm-svn: 98566
2010-03-15 19:09:43 +00:00
Devang Patel
d3f41e8939
In "empty" bb, the return instruction may not be first instruction, if dbg value intrinsics are present in this bb. Use terminator to find return instructions.
...
llvm-svn: 98565
2010-03-15 19:05:46 +00:00
Bill Wendling
0344874921
Place the LSDA into the TEXT section for x86 Darwin. If the global it's pointing
...
to is local to the translation unit, we need to place fill the value of that
symbol into the non-lazy pointer.
This should conclude all Darwin changes for placing the LSDA into the TEXT
section. There is some cleanup to do. I.e., there's no longer a special need for
target-specific code here. But that can come later.
llvm-svn: 98564
2010-03-15 19:04:37 +00:00
Evan Cheng
ae5edee6c8
Avoid sibcall optimization if either caller or callee is using sret semantics.
...
llvm-svn: 98561
2010-03-15 18:54:48 +00:00
Chris Lattner
49ee281213
revert r98550, it isn't necessary or sufficient.
...
llvm-svn: 98558
2010-03-15 18:42:01 +00:00
Devang Patel
a3e9c9ca7b
Emit dwarf variable info communicated by code generator through DBG_VALUE machine instructions.
...
This is a work in progress.
llvm-svn: 98556
2010-03-15 18:33:46 +00:00
Chris Lattner
51a6eb7d12
don't eliminate address-taken blocks here.
...
llvm-svn: 98550
2010-03-15 16:37:42 +00:00
Chris Lattner
c73a361ac5
SIGN_EXTEND from the same type as the dest is valid.
...
llvm-svn: 98548
2010-03-15 16:15:56 +00:00
Chris Lattner
d5df1f5b54
sink the call to VT.getSizeInBits() down into its uses,
...
not all unary nodes necessarily have a simple result type.
llvm-svn: 98547
2010-03-15 16:05:15 +00:00
Duncan Sands
145584e037
Treat copysignl like the other copysign functions.
...
llvm-svn: 98542
2010-03-15 14:01:44 +00:00
Jeffrey Yasskin
a1d3908a35
Don't save a temporary string into a StringRef field.
...
llvm-svn: 98538
2010-03-15 06:59:21 +00:00
Chris Lattner
632eb65cd2
fix MCSectionELF to not leak memory, just like I did for MCSymbol.
...
MCSectionMachO is already fine (yay for fixed size arrays?),
MCSectionCOFF still leaks.
llvm-svn: 98537
2010-03-15 06:23:52 +00:00
Chris Lattner
133487696a
fix a memory leak yjasskin pointed out: MCSymbol is bump pointer
...
allocated and thus not freed. This is cool except that it contains
and std::string so the string data didn't get freed. In any case
there is no reason to redundantly store the string data in the
MCSymbol anyway, just make the MCSymbol ref the string data in the
MCContext StringMap.
llvm-svn: 98536
2010-03-15 06:15:35 +00:00
Chris Lattner
0db1d6500a
eliminate some #if 0 code I added in r96905, type inference
...
now enforces that input/output named values have hte same type.
llvm-svn: 98535
2010-03-15 06:03:22 +00:00
Chris Lattner
cabe037b2d
Completely rewrite tblgen's type inference mechanism,
...
changing the primary datastructure from being a
"std::vector<unsigned char>" to being a new TypeSet class
that actually has (gasp) invariants!
This changes more things than I remember, but one major
innovation here is that it enforces that named input
values agree in type with their output values.
This also eliminates code that transparently assumes (in
some cases) that SDNodeXForm input/output types are the
same, because this is wrong in many case.
This also eliminates a bug which caused a lot of ambiguous
patterns to go undetected, where a register class would
sometimes pick the first possible type, causing an
ambiguous pattern to get arbitrary results.
With all the recent target changes, this causes no
functionality change!
llvm-svn: 98534
2010-03-15 06:00:16 +00:00
Chris Lattner
227aa3595b
MachineMove ctor doesn't need to to mutate input, add 'const'
...
llvm-svn: 98533
2010-03-15 05:55:35 +00:00
Chris Lattner
eb319f36b9
do some serious surgery on CellSPU to get it back into a world
...
where it uses types consistently.
llvm-svn: 98532
2010-03-15 05:53:47 +00:00
Chris Lattner
26e6273772
fix a few more ambiguous types.
...
llvm-svn: 98531
2010-03-15 05:53:30 +00:00
Chris Lattner
4f26c1a960
add some missing types
...
llvm-svn: 98530
2010-03-15 05:35:37 +00:00
Jeffrey Yasskin
3ddd88f523
Tell Valgrind when we modify already-executed machine code so it knows
...
to re-instrument the code. We depend on the system valgrind.h to
avoid adding a new license.
llvm-svn: 98529
2010-03-15 04:57:55 +00:00
Chris Lattner
022a9fb269
various cleanups from daniel
...
llvm-svn: 98528
2010-03-15 04:12:21 +00:00
Chris Lattner
ce81b3c120
fix an ambiguous pattern, contrary to expectations, scalar_to_vector
...
doesn't have a type constraint on the scalar because we don't have
an 'sAny' type.
llvm-svn: 98527
2010-03-15 00:52:43 +00:00
Chris Lattner
f18c0e6b4b
remove dead method.
...
llvm-svn: 98526
2010-03-15 00:00:42 +00:00
Chris Lattner
65a437fb80
don't forget to close a FD on an error condition, found by
...
cppcheck, PR6617. Patch by Ettl Martin!
llvm-svn: 98525
2010-03-14 23:16:45 +00:00
Chris Lattner
bbd8bd3257
tidy up and expound more on how half-float works.
...
llvm-svn: 98524
2010-03-14 23:03:31 +00:00
Chris Lattner
9fa851b9d4
tidy indentation
...
llvm-svn: 98523
2010-03-14 22:44:11 +00:00
Chris Lattner
402d6442c5
no really, all 64-bit cpu's have cmov support. This should
...
fix the rest of the buildbot failures on non-x86 hosts.
llvm-svn: 98522
2010-03-14 22:39:35 +00:00
Chris Lattner
d03a956a01
filecheckize a test and mark these wiht a cpu so it passes
...
on hosts without cmovs.
llvm-svn: 98521
2010-03-14 22:31:16 +00:00
Chris Lattner
77f7dba60c
all 64-bit cpus have cmov, this should fix CodeGen/X86/cmov.ll
...
(at least) on non-x86 builders.
llvm-svn: 98520
2010-03-14 22:24:34 +00:00
Benjamin Kramer
cabfdb1e67
Remove pointless forward declaration, MSVC got confused by this.
...
llvm-svn: 98519
2010-03-14 22:00:28 +00:00
Duncan Sands
ca595495e4
Turn calls to copysignl into an FCOPYSIGN node. Handle FCOPYSIGN nodes
...
with ppc_f128 type by having the type legalizer turn these back into a
call to copysignl.
llvm-svn: 98514
2010-03-14 21:08:40 +00:00
Evan Cheng
00fd0b6749
Rename SDDbgValue.h to SDNodeDbgValue.h for consistency.
...
llvm-svn: 98513
2010-03-14 19:56:39 +00:00
Chris Lattner
f71cb6c439
fix ShrinkDemandedOps to not leave dead nodes around,
...
fixing PR6607
llvm-svn: 98512
2010-03-14 19:46:02 +00:00
Chris Lattner
468decdda2
rewrite ShrinkDemandedOps to be faster and indent less,
...
no functionality change.
llvm-svn: 98511
2010-03-14 19:43:04 +00:00
Evan Cheng
6a9e10905b
Fix jit encoding bugs.
...
llvm-svn: 98510
2010-03-14 19:28:34 +00:00
Chris Lattner
f1ed59a418
make -view-isel-dags print after the 'ShrinkDemandedOps' pass.
...
llvm-svn: 98509
2010-03-14 19:27:55 +00:00
Chris Lattner
5049f23592
don't have i386-specific tests in CodeGen/Generic, PR6601.
...
llvm-svn: 98508
2010-03-14 18:51:18 +00:00
Chris Lattner
6feb7e3325
fix PR6605, X86ISD::CMP always returns i32 (EFLAGS), not
...
the operand type.
llvm-svn: 98507
2010-03-14 18:44:35 +00:00
Anton Korobeynikov
79a7c7823d
Fix typo
...
llvm-svn: 98506
2010-03-14 18:42:52 +00:00
Anton Korobeynikov
cd4dd9c1db
Document fp16 intrinsics
...
llvm-svn: 98505
2010-03-14 18:42:47 +00:00
Anton Korobeynikov
846a117892
Feature test for half precision FP.
...
llvm-svn: 98504
2010-03-14 18:42:43 +00:00
Anton Korobeynikov
0a65a37344
Add substarget feature for FP16
...
llvm-svn: 98503
2010-03-14 18:42:38 +00:00
Anton Korobeynikov
d7fece38fc
Add codegen support for FP16 on ARM
...
llvm-svn: 98502
2010-03-14 18:42:31 +00:00
Anton Korobeynikov
59e96008bd
Make default expansion for FP16 <-> FP32 nodes into libcalls
...
llvm-svn: 98501
2010-03-14 18:42:24 +00:00
Anton Korobeynikov
39ed49df71
Add DAG nodes to represent FP16 <-> FP32 intrinsics
...
llvm-svn: 98500
2010-03-14 18:42:15 +00:00
Anton Korobeynikov
b975fa6d9b
Cleanup
...
llvm-svn: 98499
2010-03-14 18:42:08 +00:00
Anton Korobeynikov
c6273f28a9
The fp16 <-> fp32 intrinsics are pure, mark them so they can be CSE'd, etc.
...
llvm-svn: 98498
2010-03-14 18:42:04 +00:00
Anton Korobeynikov
77bbbf782a
Add intrinsics to represent fp16 <-> fp32 conversions
...
llvm-svn: 98497
2010-03-14 18:41:50 +00:00
Chris Lattner
a30d4ce194
add support for pentium class CPUs which do not have cmov,
...
PR4841. Patch by Craig Smith!
llvm-svn: 98496
2010-03-14 18:31:44 +00:00
Chris Lattner
9efbbcbe45
fix AsmPrinter::GetBlockAddressSymbol to always return a unique
...
label instead of trying to form one based on the BB name (which
causes collisions if the name is empty). This fixes PR6608
llvm-svn: 98495
2010-03-14 17:53:23 +00:00
Chris Lattner
87dd2d6388
comment fix.
...
llvm-svn: 98494
2010-03-14 17:10:52 +00:00
Chris Lattner
28aae17fee
shrink 4-byte branches to 1-byte branches when lowering from
...
MachineInstr -> MCInst. This is what the assembler backend wants,
it relaxes from smaller to larger things. This fixes rdar://7750815
llvm-svn: 98493
2010-03-14 17:04:18 +00:00
Bill Wendling
55e69d179b
Skip over debug info when trying to merge two return BBs.
...
llvm-svn: 98491
2010-03-14 10:40:55 +00:00
Bill Wendling
ee84f27536
Make returns more consistent with others.
...
llvm-svn: 98490
2010-03-14 10:40:28 +00:00
Chris Lattner
6e52e9db31
get MMI out of the label uniquing business, just go to MCContext
...
to get unique assembler temporary labels.
llvm-svn: 98489
2010-03-14 08:36:50 +00:00
Chris Lattner
f1c2b9d3b1
fix these two get the mcsymbol operand instead of imm operand.
...
llvm-svn: 98487
2010-03-14 08:28:48 +00:00
Chris Lattner
073d817958
add a new CreateTempSymbol method, the use case for
...
CreateTempSymbol vs GetOrCreateTemporarySymbol are
completely different.
llvm-svn: 98486
2010-03-14 08:23:30 +00:00
Chris Lattner
6dcaba516f
don't use getDWLabel("label" anymore, always go through MMI.
...
llvm-svn: 98485
2010-03-14 08:18:13 +00:00
Chris Lattner
ff1fdd6787
remove now-dead code, all labels use MCSymbols.
...
llvm-svn: 98484
2010-03-14 08:17:53 +00:00
Chris Lattner
b4666f4517
change SrcLineInfo to contain a label instead of a label ID.
...
llvm-svn: 98483
2010-03-14 08:15:55 +00:00
Chris Lattner
d5e8d9f29a
Now that DBG_LABEL is updated, we can finally make MachineMove
...
contain an MCSymbol instead of a label index.
llvm-svn: 98482
2010-03-14 08:12:40 +00:00
Chris Lattner
c26f44fb07
change the DBG_LABEL MachineInstr to always be created
...
with an MCSymbol instead of an immediate.
llvm-svn: 98481
2010-03-14 07:56:48 +00:00
Chris Lattner
54109deae3
xfail properly
...
llvm-svn: 98479
2010-03-14 07:55:34 +00:00
Chris Lattner
8e2b12b164
unbreak the build, grr symlinks.
...
llvm-svn: 98477
2010-03-14 07:36:49 +00:00
Chris Lattner
1e2dc539b9
xfail these tests temporarily to get teh buildbots back to happy land.
...
llvm-svn: 98476
2010-03-14 07:32:48 +00:00
Chris Lattner
806f0fb7b1
Change this code to allocate temporary labels from mccontext,
...
not from MMI.
llvm-svn: 98475
2010-03-14 07:29:45 +00:00
Chris Lattner
1065f49ad9
switch GC_LABEL to use an MCSymbol operand instead of a label ID operand.
...
llvm-svn: 98474
2010-03-14 07:27:07 +00:00
Chris Lattner
5a6e262c72
Fix some EH failures on NNT I introduced in r98461
...
llvm-svn: 98471
2010-03-14 07:02:50 +00:00
Chris Lattner
04857fab70
fix a bug I introduced in r98459, causing some NNT failures.
...
llvm-svn: 98470
2010-03-14 06:50:56 +00:00
Evan Cheng
44be5362d6
Check in tablegen changes to fix disassembler related failures caused by r98465.
...
llvm-svn: 98468
2010-03-14 05:15:39 +00:00
Evan Cheng
d703df67ce
Do not force indirect tailcall through fixed registers: eax, r11. Add support to allow loads to be folded to tail call instructions.
...
llvm-svn: 98465
2010-03-14 03:48:46 +00:00
Daniel Dunbar
aa8f95eb56
MC: Fix a crash on invalid, attempting to evaluate undefined symbols.
...
llvm-svn: 98464
2010-03-14 03:10:40 +00:00
Chris Lattner
ee2fbbc978
change the LabelSDNode to be EHLabelSDNode and make it hold
...
an MCSymbol. Make the EH_LABEL MachineInstr hold its label
with an MCSymbol instead of ID. Fix a bug in MMI.cpp which
would return labels named "Label4" instead of "label4".
llvm-svn: 98463
2010-03-14 02:33:54 +00:00
Chris Lattner
07293da97e
eliminate InvalidateLabel and LabelIDList from MMI and replace
...
them with a counter.
llvm-svn: 98462
2010-03-14 02:24:55 +00:00
Chris Lattner
ee95d4c61c
use Label->isDefined() instead of isLabelDeleted() now that we
...
consistently use MCSymbol and only call this predicate after
they should have been emitted.
llvm-svn: 98461
2010-03-14 02:20:58 +00:00
Chris Lattner
f7aa541107
fix some pointless layering violations.
...
llvm-svn: 98460
2010-03-14 01:56:06 +00:00
Chris Lattner
34adc8d225
change EH related stuff (other than EH_LABEL) to use MCSymbol
...
instead of label ID's. This cleans up and regularizes a bunch
of code and makes way for future progress.
Unfortunately, this pointed out to me that JITDwarfEmitter.cpp
is largely copy and paste from DwarfException/MachineModuleInfo
and other places. This is very sad and disturbing. :(
One major change here is that TidyLandingPads moved from being
called in DwarfException::BeginFunction to being called in
DwarfException::EndFunction. There should not be any
functionality change from doing this, but I'm not an EH expert.
llvm-svn: 98459
2010-03-14 01:41:15 +00:00
Daniel Dunbar
f3530bdd8a
X86_64: Fix encoding for the rest of the 64i32 instructions too.
...
llvm-svn: 98458
2010-03-13 22:57:53 +00:00
Daniel Dunbar
d324a7c990
X86: Fix ADD64i32 encoding.
...
llvm-svn: 98457
2010-03-13 22:49:39 +00:00
Daniel Dunbar
7c1f3d8cad
MC/X86_64: Symbol support.
...
llvm-svn: 98456
2010-03-13 22:49:35 +00:00
Daniel Dunbar
56597588f0
MC/Mach-O: Initial x86_64 support.
...
llvm-svn: 98454
2010-03-13 22:10:17 +00:00
Daniel Dunbar
c19fb6f96d
macho-dump: Basic Mach 64 support.
...
llvm-svn: 98453
2010-03-13 22:10:11 +00:00
Chris Lattner
29bdac4928
eliminate the now-unneeded context argument of MBB::getSymbol()
...
llvm-svn: 98451
2010-03-13 21:04:28 +00:00
Chris Lattner
e468f88b26
rearrange MCContext ownership. Before LLVMTargetMachine created it
...
and passing off ownership to AsmPrinter. Now MachineModuleInfo
creates it and owns it by value. This allows us to use MCSymbols
more consistently throughout the rest of the code generator, and
simplifies a bit of code. This also allows MachineFunction to
keep an MCContext reference handy, and cleans up the TargetRegistry
interfaces for AsmPrinters.
llvm-svn: 98450
2010-03-13 20:55:24 +00:00
Jeffrey Yasskin
754d2dc041
Make lit pay attention to --vg for unittests too.
...
llvm-svn: 98449
2010-03-13 20:45:41 +00:00
Jeffrey Yasskin
0374d7feb0
Allow types that have been forwarded to to be freed.
...
Tested: make check-lit && valgrind --dsymutil=yes --leak-check=full unittests/ExecutionEngine/JIT/Debug/JITTests
llvm-svn: 98447
2010-03-13 20:09:55 +00:00
Nick Lewycky
84189ab22b
Teach this test not to leak. Also, clean up all the cast<BinaryOperator> cruft.
...
llvm-svn: 98446
2010-03-13 19:58:26 +00:00
Daniel Dunbar
144873437c
llvm-mc: Delete output files on error.
...
llvm-svn: 98445
2010-03-13 19:31:47 +00:00
Daniel Dunbar
906a432031
MC/X86_64: Fix matching of leaq.
...
llvm-svn: 98444
2010-03-13 19:31:44 +00:00
Daniel Dunbar
e60c883bf4
MC/X86_64: Fix matching of callq.
...
llvm-svn: 98443
2010-03-13 19:31:38 +00:00
Chris Lattner
341b1d25f1
add a hack to allow parsing negative minint. rdar://7751341
...
llvm-svn: 98442
2010-03-13 19:25:13 +00:00
Chris Lattner
10ebb68a49
add builder support for mcsymbol operands.
...
llvm-svn: 98434
2010-03-13 08:16:25 +00:00
Chris Lattner
6c604e3f94
add support for MCSymbols as operands to MachineInstrs.
...
llvm-svn: 98433
2010-03-13 08:14:18 +00:00
Chris Lattner
41e275dc8e
simplify EmitFrameMoves to take BaseLabel in as a symbol
...
instead of as a stem+idx pair, simplify the "is a new
location" check to use symbol comparison.
llvm-svn: 98432
2010-03-13 08:05:25 +00:00
Chris Lattner
5bb8207c13
simplify some overly general code. The stack always grows down on x86.
...
llvm-svn: 98431
2010-03-13 08:04:35 +00:00
Benjamin Kramer
13f4db8c29
Fix another warning. There is a functionality change but I believe it's correct.
...
llvm-svn: 98430
2010-03-13 07:50:22 +00:00
Chris Lattner
8811e12314
factor some labels, simplify some code.
...
llvm-svn: 98429
2010-03-13 07:40:56 +00:00
Benjamin Kramer
e5b2c1d9be
Add some parens and silence a warning.
...
llvm-svn: 98428
2010-03-13 07:40:34 +00:00
Bob Wilson
f1e8f7ff7d
Attempt to appease the arm-linux buildbot by fixing the JIT encodings for new
...
base register updating load/store-multiple instructions.
llvm-svn: 98427
2010-03-13 07:34:35 +00:00
Chris Lattner
2c3f478c0b
various cleanups.
...
llvm-svn: 98426
2010-03-13 07:26:18 +00:00
Daniel Dunbar
34b8e553ea
MC/Mach-O: PCrel relocations weren't using the right base address, they are
...
relative to the fragment address, not its offset. This was masked by the text
section normally being at address 0.
llvm-svn: 98420
2010-03-13 02:38:00 +00:00
Daniel Dunbar
322fec671b
llvm-mc: Support -n, useful for comparing -integrated-as output since the
...
compiler may not lead with the text section.
llvm-svn: 98418
2010-03-13 02:20:57 +00:00
Daniel Dunbar
4689211583
llvm-mc: Support -arch as a simplified form of -triple.
...
llvm-svn: 98417
2010-03-13 02:20:38 +00:00
Evan Cheng
2a65429671
Fix a typo in ValueTracking that's causing instcombine to delete needed shift instructions.
...
llvm-svn: 98416
2010-03-13 02:20:29 +00:00
Chris Lattner
b7aa9527ef
reimplement the string pool used for inlined function
...
entries to not thrash std::strings and MCSymbols.
llvm-svn: 98415
2010-03-13 02:17:42 +00:00
Jeffrey Yasskin
61e710c2fd
Remove the last memory leak from the VMCore unit tests.
...
Tested: valgrind --leak-check=full unittests/VMCore/Debug/VMCoreTests
llvm-svn: 98414
2010-03-13 02:15:08 +00:00
Chris Lattner
81fe45d911
switch to the text section at the start of the .s file for darwin/x86
...
targets. This is a temporary hack for the .o file writer that Daniel
wants :)
llvm-svn: 98413
2010-03-13 02:10:00 +00:00
Jeffrey Yasskin
3d73d1a73c
Remove a memory leak from MetadataTest.
...
Tested: valgrind --leak-check=full unittests/VMCore/Debug/VMCoreTests
llvm-svn: 98412
2010-03-13 01:39:20 +00:00
Jeffrey Yasskin
5a952b1339
Remove a memory leak from VerifierTest.
...
Tested: valgrind --leak-check=full unittests/VMCore/Debug/VMCoreTests
llvm-svn: 98411
2010-03-13 01:34:56 +00:00
Jeffrey Yasskin
2cc2476198
Delete MDNodes when LLVMContext is destroyed. Previous attempts: r97918, r97788.
...
Tested: clang debug bootstrap, llvm-gcc bootstrap, `make check-lit`
after configuring with --with-llvmgccdir (and this did run the
FrontendC* tests this time)
llvm-svn: 98410
2010-03-13 01:26:15 +00:00
Bob Wilson
947f04bad0
Change ARM ld/st multiple instructions to have variant instructions for
...
writebacks to the address register. This gets rid of the hack that the
first register on the list was the magic writeback register operand. There
was an implicit constraint that if that operand was not reg0 it had to match
the base register operand. The post-RA scheduler's antidependency breaker
did not understand that constraint and sometimes changed one without the
other. This also fixes Radar 7495976 and should help the verifier work
better for ARM code.
There are now new ld/st instructions explicit writeback operands and explicit
constraints that tie those registers together.
llvm-svn: 98409
2010-03-13 01:08:20 +00:00
Devang Patel
93142469ac
Do not ignore arg_size() impact while counting bb instructions.
...
llvm-svn: 98408
2010-03-13 01:05:02 +00:00
Daniel Dunbar
18fc344290
MC/X86: Add temporary hack to match shrl $1,%eax correctly, to support testing
...
other functionality on 403.gcc compiled at -O0.
llvm-svn: 98405
2010-03-13 00:47:29 +00:00
Daniel Dunbar
b86672059e
MC/X86: Add an XFAIL test where we aren't matching the correct instruction
...
because we don't understand how the specific instruction is doing sign
extension.
llvm-svn: 98404
2010-03-13 00:47:25 +00:00
Devang Patel
877d0355bd
Remove extra parameter.
...
llvm-svn: 98403
2010-03-13 00:45:31 +00:00
Bob Wilson
53149401ee
Combine the code to build VLDM and VSTM instructions, since they are
...
mostly the same.
llvm-svn: 98402
2010-03-13 00:43:32 +00:00
Devang Patel
ad591dc6af
Do not overestimate code size reduction in presense of debug info.
...
Use CodeMetrics.analyzeBasicBlock() to estimate BB size.
llvm-svn: 98401
2010-03-13 00:10:20 +00:00
Bob Wilson
af10d27d80
Tidy up. No functional changes.
...
llvm-svn: 98398
2010-03-12 22:50:09 +00:00
Daniel Dunbar
12f1e32d59
MC/Mach-O: Implement initial support for relaxation.
...
- The implementation is currently very brain dead and inefficient, but I have a
clear plan on how to fix it.
- The good news is, it works and correctly assembles 403.gcc (when built with
Clang, at '-Os', '-Os -g', and '-O3'). Even better, at '-Os' and '-Os -g',
the resulting binary is exactly equivalent to that when built with the system
assembler. So it probably works! :)
llvm-svn: 98396
2010-03-12 22:07:14 +00:00
Bob Wilson
27cce1c0b6
Remove obsolete comments. VLDM is implemented in ARMInstrVFP.td.
...
llvm-svn: 98395
2010-03-12 22:00:08 +00:00
Jeffrey Yasskin
9eeda13a52
Fix LLVM build when the user specifies CPPFLAGS on the make command line.
...
llvm-svn: 98394
2010-03-12 21:42:14 +00:00
Chris Lattner
5ea039ad5c
remove gone method, grr symlinks.
...
llvm-svn: 98392
2010-03-12 21:30:49 +00:00
Chris Lattner
013f794dc0
remove special case code that isn't needed anymore.
...
llvm-svn: 98391
2010-03-12 21:21:19 +00:00
Chris Lattner
0b822ab447
inline GetGlobalValueSymbol into the rest its callers and
...
remove it.
llvm-svn: 98390
2010-03-12 21:19:23 +00:00
Chris Lattner
9e4cafe6f1
inline the now-trivial implementation of GetGlobalValueSymbol into
...
some of its callers.
llvm-svn: 98388
2010-03-12 21:09:07 +00:00
Chris Lattner
e80055f8fc
eliminate the X86 version of GetGlobalValueSymbol, allowing
...
it to be non-virtual and soon disappear.
llvm-svn: 98387
2010-03-12 21:06:41 +00:00
Chris Lattner
d3ca1e2854
prune #includes, this file should be removed pending hte cygwin stub issue being resolved.
...
llvm-svn: 98386
2010-03-12 21:04:31 +00:00
Chris Lattner
8d99c764d3
move fastcall/stdcall mangling up into Mangler.
...
llvm-svn: 98384
2010-03-12 21:03:47 +00:00
Daniel Dunbar
ea9e2f8a15
MC: Factor out MCAssembler::EvaluateFixup, and simplify.
...
llvm-svn: 98381
2010-03-12 21:00:49 +00:00
Daniel Dunbar
968b36a0bd
MC: Constify MCAsmLayout argument to MCExpr::EvaluteAs...
...
llvm-svn: 98380
2010-03-12 21:00:45 +00:00
Daniel Dunbar
921e79f5eb
MC: Add MCAssembler::addFixup, which enforces that fixups are added in order.
...
llvm-svn: 98379
2010-03-12 21:00:38 +00:00
Chris Lattner
c7b46f9d9c
give Mangler access to TargetData.
...
llvm-svn: 98378
2010-03-12 20:47:28 +00:00
Chris Lattner
892ac21f06
make DecorateCygMingName a static method.
...
llvm-svn: 98377
2010-03-12 20:43:52 +00:00
Benjamin Kramer
a956527c92
Add a virtual destructor and give vtable a home.
...
llvm-svn: 98376
2010-03-12 20:41:29 +00:00
Chris Lattner
74026ffcae
minor tidying, only do work if a function is
...
actually X86_StdCall or X86_FastCall.
llvm-svn: 98374
2010-03-12 19:48:03 +00:00
Chris Lattner
e397df7af0
eliminate the string form of DecorateCygMingName
...
llvm-svn: 98373
2010-03-12 19:42:40 +00:00
Chris Lattner
c795a5235f
remove the FnArgWords cache to make way for future changes.
...
llvm-svn: 98372
2010-03-12 19:31:03 +00:00
Bill Wendling
3d0cd822a9
Add a beta-test for placing the LSDA into the TEXT section on X86.
...
llvm-svn: 98370
2010-03-12 19:20:40 +00:00
Devang Patel
d19e302f77
Fix llc crash on invalid input.
...
llvm-svn: 98369
2010-03-12 19:18:30 +00:00
Chris Lattner
8abe1ce883
Remove some dead code. This method only gets called on
...
definitions.
llvm-svn: 98368
2010-03-12 19:14:18 +00:00
Chris Lattner
6428db5089
use Mang->getSymbol instead of duplicating the logic, reduce indentation.
...
llvm-svn: 98367
2010-03-12 19:04:14 +00:00
Chris Lattner
be3242b523
finally give Mangler a getSymbol method, which returns an MCSymbol
...
for a global instead of messing around with string buffers.
llvm-svn: 98366
2010-03-12 18:55:20 +00:00
Chris Lattner
45ec3f8944
remove dead code.
...
llvm-svn: 98365
2010-03-12 18:49:32 +00:00
Chris Lattner
d75813970a
simplify code to use OutContext.GetOrCreateTemporarySymbol with
...
no arguments instead of having to come up with a unique name.
This also makes the code less fragile.
llvm-svn: 98364
2010-03-12 18:47:50 +00:00
Chris Lattner
2eff505fba
make the mangler take an MCContext instead of an MAI.
...
No functionality change.
llvm-svn: 98363
2010-03-12 18:44:54 +00:00
Chris Lattner
ac77bf5d1e
remove MAI argument from createAsmStreamer since it
...
can get it from the context now.
llvm-svn: 98361
2010-03-12 18:28:53 +00:00
Chris Lattner
77b0a2ee03
fix a bug emitting .secrel32 that I introduced, PR6587, patch
...
by A.Mazur!
llvm-svn: 98360
2010-03-12 18:10:35 +00:00
Duncan Sands
8c35506fbd
When constant folding GEP of GEP, do not crash if an index of
...
the inner GEP is not a ConstantInt.
llvm-svn: 98359
2010-03-12 17:55:20 +00:00
Jeffrey Yasskin
35b4e4f641
Free DbgScopes in DwarfDebug::endFunction(). Also increased the const-ness of
...
several fields to make it easier to figure out where bugs might be creeping in.
llvm-svn: 98358
2010-03-12 17:45:06 +00:00
Duncan Sands
03fcbcf407
Revert turning copysignl into a COPYSIGN node for the moment:
...
ppc calls copysignl with a 128 bit ppc long double, resulting
in a node that the type legalizer doesn't know how to expand.
llvm-svn: 98357
2010-03-12 17:41:34 +00:00
Kovarththanan Rajaratnam
61bea8fe0b
Remove superfluous NULL assignment
...
llvm-svn: 98350
2010-03-12 14:17:24 +00:00
Benjamin Kramer
d69ee90f2f
Use StringRef::substr instead of std::string::substr to avoid using a free'd
...
string temporary. This should fix PR6590.
llvm-svn: 98349
2010-03-12 13:54:59 +00:00
Duncan Sands
607f1825b0
Now that it's supported, turn copysignl into a COPYSIGN node.
...
llvm-svn: 98348
2010-03-12 12:13:59 +00:00
Duncan Sands
4c55f76936
Fix PR6522: implement copysign expansion for x86 long double
...
(it seems that FreeBSD doesn't have copysignl). Done by
removing a bunch of assumptions from the code. This may also
help with sparc 128 bit floats.
llvm-svn: 98346
2010-03-12 11:45:06 +00:00
Benjamin Kramer
7b88a49f3e
Factor checked library call optimization into a common helper class and use it
...
to unify the almost identical code in CodeGenPrepare and InstCombineCalls.
llvm-svn: 98338
2010-03-12 09:27:41 +00:00
Chris Lattner
53ebf8a7ca
fix PR6577, a bug in sdbuilder lowering select instructions
...
whose true value was not Val#0.
llvm-svn: 98336
2010-03-12 07:15:36 +00:00
Chris Lattner
399f1f4fd3
update mkpatch for MC, patch by Aaron Gray
...
llvm-svn: 98334
2010-03-12 06:32:12 +00:00
Bill Wendling
dd3fe94336
The same situation that effected ARM effects PPC with regards to placing the
...
LSDA into the TEXT section. We need to generate non-lazy pointers to it on
Mach-O. However, the object the NLP points to may be local to the translation
unit. If so, then the NLP needs to have the value of that object specified
instead of "0", which the linker interprets as "external".
llvm-svn: 98325
2010-03-12 02:00:43 +00:00
Chris Lattner
47bef1a8a2
make TargetLoweringObjectFile::getExprForDwarfReference
...
just make unnamed temp symbols instead of having to come
up with its own names.
llvm-svn: 98324
2010-03-12 01:56:43 +00:00
Devang Patel
f5c2a6b371
There is no need to create specification DIE for definitions at DIFile level.
...
llvm-svn: 98302
2010-03-11 23:44:52 +00:00
Bill Wendling
faec0815a3
MC-ize PPC's asm printing of stubs.
...
llvm-svn: 98300
2010-03-11 23:39:44 +00:00
Nate Begeman
2e41605d4f
Whoops this already existed.
...
llvm-svn: 98297
2010-03-11 23:21:19 +00:00
Nate Begeman
5daa235c91
Add a handful of additional useful pass manager things to the C API
...
llvm-svn: 98296
2010-03-11 23:06:07 +00:00
Jakob Stoklund Olesen
cdb31d313f
Extract methods from LocalRewriter::RewriteMBB bringing it down to 666 lines.
...
llvm-svn: 98295
2010-03-11 23:04:34 +00:00
Chris Lattner
d3691dd04b
enhance MCContext::GetOrCreateTemporarySymbol() to create a new symbol
...
with an arbitrary unique name.
llvm-svn: 98294
2010-03-11 22:56:10 +00:00
Chris Lattner
768ea2add2
change MCContext to always have an MCAsmInfo.
...
llvm-svn: 98293
2010-03-11 22:53:35 +00:00
Chris Lattner
03627cb12c
fix a fixme in TargetLoweringObjectFile::getExprForDwarfReference
...
where we used ot create an MCSymbol for ".". Now emit an assembler
temporary label and reference it instead of "." textually.
rdar://7739457
llvm-svn: 98292
2010-03-11 21:55:20 +00:00
Dan Gohman
576aec4363
Remove getWidenVectorType, which is no longer used.
...
llvm-svn: 98289
2010-03-11 21:39:57 +00:00
Chris Lattner
216e7299d7
empty symbols aren't possible, the mcsymbol ctor aborts on them.
...
llvm-svn: 98288
2010-03-11 21:38:58 +00:00
Johnny Chen
c1d1229d78
Set the (Format)F filed of t2Int_MemBarrierV7 & t2Int_SyncBarrierV7 to ThumbFrm,
...
instead of Pseudo, which helps Thumb decoder to recognize them as Thumb instr.
llvm-svn: 98285
2010-03-11 21:02:50 +00:00
Benjamin Kramer
2fc395659c
stpcpy is so similar to strcpy, it doesn't deserve a complete copy of the __strcpy_chk -> strcpy code.
...
llvm-svn: 98284
2010-03-11 20:45:13 +00:00
Bill Wendling
00810c39da
revert r98270.
...
llvm-svn: 98281
2010-03-11 19:50:31 +00:00
Chris Lattner
2562356992
rename getSymbolForDwarf* to getExprForDwarf* since it returns
...
an MCExpr and not an MCSymbol. Change it to take an MCStreamer,
which is currently unused.
No functionality change.
llvm-svn: 98278
2010-03-11 19:41:58 +00:00
Evan Cheng
180704dd1d
In case of tail call size of Ins and InVals may not match.
...
llvm-svn: 98277
2010-03-11 19:38:18 +00:00
Eric Christopher
607de1de53
Lower stpcpy_chk when possible.
...
llvm-svn: 98274
2010-03-11 19:24:34 +00:00
Evan Cheng
31fe835bf2
Bad bad bug. x86 force indirect tail call address into eax when it's meant to force it into a call preserved register instead. Change it to ecx for now.
...
llvm-svn: 98270
2010-03-11 18:49:14 +00:00
Richard Osborne
7aa06ac2b9
Remove dead code. (S|U)MUL_LO is now lowered to LMUL or MACC(S|U)
...
llvm-svn: 98269
2010-03-11 18:38:59 +00:00
Jeffrey Yasskin
0708de1f97
Avoid leaking CompileUnits in DwarfDebug.cpp.
...
llvm-svn: 98268
2010-03-11 18:29:55 +00:00
Daniel Dunbar
64b408b124
MC/Mach-O: Add MCSymbolData::getAddress() utility.
...
llvm-svn: 98266
2010-03-11 18:22:51 +00:00
Eric Christopher
103e3ef893
Fix typo.
...
llvm-svn: 98260
2010-03-11 17:45:38 +00:00
Richard Osborne
4780109254
Add dag combine to simplify lmul(x, 0, a, b)
...
llvm-svn: 98258
2010-03-11 16:26:35 +00:00
Richard Osborne
29ffbf123f
Switch XCore over to using inline jump table entries.
...
llvm-svn: 98256
2010-03-11 14:58:56 +00:00
Richard Osborne
6d3e92dfee
Add a new jump table encoding to indicate jump tables entries
...
are inside the function by the target at the point of use.
llvm-svn: 98255
2010-03-11 14:58:16 +00:00
Evan Cheng
8c4df8160e
The check for coalescing a virtual register to a physical register, e.g.
...
cl = EXTRACT_SUBREG reg1024, 1, is overly conservative. It should check
for overlaps of vr's live interval with the super registers of the
physical register (ECX in this case) and let JoinIntervals() handle checking
the coalescing feasibility against the physical register (cl in this case).
llvm-svn: 98251
2010-03-11 08:20:21 +00:00
Ted Kremenek
a3b221f9a9
Update CMake build.
...
llvm-svn: 98250
2010-03-11 07:51:23 +00:00
Eric Christopher
304f13c637
Have fast-isel understand llvm.objectsize. Update testcase for slightly
...
different codegen.
llvm-svn: 98244
2010-03-11 06:20:22 +00:00
Jeffrey Yasskin
0069d72c05
Make clang bootstrap happier on OSX 10.5 by reducing the number of headers
...
included when using global symbols to ask the linker for the addresses of
various functions. One of the symbols was actually getting declared by a
header included in DynamicLibrary.cpp, which conflicted with the "extern void*"
declaration in SearchForAddressOfSpecialSymbol().
llvm-svn: 98243
2010-03-11 06:14:32 +00:00
Daniel Dunbar
5c5228a8f6
MC/Mach-O: Implement "absolutizing" semantics of .set, by evaluating the assembly time value of variables.
...
llvm-svn: 98241
2010-03-11 05:53:37 +00:00
Daniel Dunbar
cf55f96214
MC/Mach-O: Start passing in the basic MCAsmLayout object.
...
- Also, drop the current location part of AsmLayout, I think I prefer to implement this via explicit symbols.
llvm-svn: 98240
2010-03-11 05:53:33 +00:00
Eric Christopher
4b7948e09e
Do some final lowering in CodeGenPrepare of _chk calls similar to
...
that in InstCombineCalls.
More call lowering needed.
llvm-svn: 98228
2010-03-11 02:41:03 +00:00
Daniel Dunbar
ac8a95498a
MC: Sketch initial MCAsmLayout class, which encapsulates the current layout of an assembly file. The MCAsmLayout is also available for use by MCExpr::EvaluateAs{Absolute,Relocatable}, to allow target specific hooks and "absolutizing" of symbols.
...
llvm-svn: 98227
2010-03-11 02:28:59 +00:00
Daniel Dunbar
bd01967261
Fix (unused) RegisterAsmBackend template, clang++ isn't happy about this.
...
llvm-svn: 98226
2010-03-11 02:28:52 +00:00
Daniel Dunbar
84b5ddc872
Remove dead include.
...
llvm-svn: 98225
2010-03-11 02:28:48 +00:00
Dale Johannesen
197bd3eee9
Fix debug_value handling.
...
llvm-svn: 98224
2010-03-11 02:10:24 +00:00
Daniel Dunbar
c5ddbad237
MC: Provide MCAssembler with a TargetAsmBackend.
...
llvm-svn: 98222
2010-03-11 01:34:27 +00:00
Daniel Dunbar
77c4141c8f
MC: Sketch some TargetAsmBackend hooks we are going to need.
...
llvm-svn: 98221
2010-03-11 01:34:21 +00:00
Daniel Dunbar
245f5b2810
MC: Provide the target triple to AsmBackend constructors.
...
llvm-svn: 98220
2010-03-11 01:34:16 +00:00
Eric Christopher
43dc11c525
Add strncpy libcall creator. Use it when it should be used.
...
llvm-svn: 98219
2010-03-11 01:25:07 +00:00
Bill Wendling
e8e79524d2
When outputing a non-lazy pointer for a stub, we may need to fill in the value
...
for the NLP because the object it's pointing to may be internal to the file.
This seems counter-intuitive, but bear with me. When we place the LSDA into the
TEXT section, the type info pointers need to be indirect and pc-rel. We
accomplish this by using NLPs. However, sometimes the types are local to the
file. GCC gets around this by not using a NLP in this case, but a "regular"
indirection like this:
GCC_except_tbl:
.long Lfoo-.
__ZTIA: @ This is local
...
Lfoo:
.long __ZTIA
LLVM prefers NLPs on Darwin. In fact, it's more optimal for load performance to
use them.
llvm-svn: 98218
2010-03-11 01:18:13 +00:00
Johnny Chen
f5e81aeba5
Added Thumb2 LDRD/STRD pre/post variants for disassembly only.
...
Plus fixed the encoding of t2LDRDpci such that P = 1 and W = 0 (offset mode).
llvm-svn: 98217
2010-03-11 01:13:36 +00:00
Dale Johannesen
28492aa626
Make sure HasDebugValue is initialized. This should fix
...
the buildbot running valgrind.
llvm-svn: 98216
2010-03-11 00:52:12 +00:00
Bob Wilson
1b0e614b10
Fix ARM buildbot breakage.
...
llvm-svn: 98215
2010-03-11 00:46:22 +00:00
Chris Lattner
a179e4d0a8
add support, testcases, and dox for the new GHC calling
...
convention. Patch by David Terei!
llvm-svn: 98212
2010-03-11 00:22:57 +00:00
Bob Wilson
c499fae068
Lower small memcpys to load/stores on Thumb2.
...
Radar 7686922.
llvm-svn: 98210
2010-03-11 00:20:49 +00:00
Jakob Stoklund Olesen
7bbe14337b
VirtRegRewriter spring cleaning. No functional change.
...
Move methods out of line and M-x whitespace-cleanup.
Promote common method arguments to member variables.
llvm-svn: 98207
2010-03-11 00:11:33 +00:00
Chris Lattner
963b233f2c
Work around a bug in the openbsd assembler on i386,
...
which doesn't support .quad correctly because it is
"really really old". PR6528.
Yet another reason the mc assembler should take over ;-)
llvm-svn: 98205
2010-03-11 00:06:19 +00:00
Chris Lattner
4ec0b670d5
fix PR6533 by updating the br(xor) code to remember the case
...
when it looked past a trunc.
llvm-svn: 98203
2010-03-10 23:46:44 +00:00
Dale Johannesen
29108f0b6c
Cosmetic: lengthen names and improve comments.
...
llvm-svn: 98202
2010-03-10 23:37:24 +00:00
Bob Wilson
c4ceb1e2f8
Fix an obvious typo in an assert.
...
Patch by Sean Callanan.
llvm-svn: 98200
2010-03-10 22:38:45 +00:00
Bill Wendling
a810bdfcca
Add a bit along with the MCSymbols stored in the MachineModuleInfo maps that
...
indicates that an MCSymbol is external or not. (It's true if it's external.)
This will be used to specify the correct information to add to non-lazy
pointers. That will be explained further when this bit is used.
llvm-svn: 98199
2010-03-10 22:34:10 +00:00
Dale Johannesen
49de0607a8
Progress towards shepherding debug info through SelectionDAG.
...
No functional effect yet. This is still evolving and should
not be viewed as final.
llvm-svn: 98195
2010-03-10 22:13:47 +00:00
Chris Lattner
1f6689a8ba
move PR6576 here.
...
llvm-svn: 98194
2010-03-10 21:42:42 +00:00
Chris Lattner
0c48de0d62
add DESTDIR support for TOOLALIAS, for PR6557, patch by
...
Matthias Klose!
llvm-svn: 98193
2010-03-10 21:27:53 +00:00
Dan Gohman
703b12d62f
Fix another bitwidth calculation to handle vector types; based on a
...
patch by Micah Villmow for PR6572.
llvm-svn: 98188
2010-03-10 21:04:53 +00:00
Daniel Dunbar
dc765e9f03
MC/Mach-O: Use the MCAssembler symbol map instead of reconstructing.
...
llvm-svn: 98187
2010-03-10 20:58:31 +00:00
Daniel Dunbar
6eab721011
MC: Move the backend section and symbol data maps to MCAssembler.
...
llvm-svn: 98186
2010-03-10 20:58:29 +00:00
Daniel Dunbar
bf801a559a
Remove unneeded declarations.
...
llvm-svn: 98185
2010-03-10 20:58:25 +00:00
Jim Grosbach
f0a7e8e77d
Make sure the LR gets pushed in functions that use vaargs. This fixes
...
400.perlbench for the nightly tests.
llvm-svn: 98183
2010-03-10 20:01:30 +00:00
Jim Grosbach
77f781405d
comment why we use custom epilogue for t1 functions using vaargs.
...
llvm-svn: 98182
2010-03-10 19:59:47 +00:00
Dale Johannesen
e9b361b2e6
Fix another place where DEBUG_VALUE affected codegen.
...
llvm-svn: 98181
2010-03-10 19:57:56 +00:00
Dan Gohman
2734ebd37f
Add a DominatorTree argument to isLCSSA so that it doesn't have to
...
compute a set of reachable blocks for itself each time it is called, which
is fairly frequently.
llvm-svn: 98179
2010-03-10 19:38:49 +00:00
Dan Gohman
474e488c06
Constant-fold GEP-of-GEP into a single GEP.
...
llvm-svn: 98178
2010-03-10 19:31:51 +00:00
Dan Gohman
fc7a25dc36
Fix whitespace.
...
llvm-svn: 98173
2010-03-10 19:00:54 +00:00
Johnny Chen
9a3e2398ae
Factored out the disassembly printing of CPS option, MSR mask, and Negative Zero
...
operands into their own PrintMethod, in order not to pollute the printOperand()
impl with disassembly only Imm modifiers.
llvm-svn: 98172
2010-03-10 18:59:38 +00:00
Tobias Grosser
ab19e1e9b5
Fix make check with cmake/lit
...
PR6540: Set the newly introduced variables ENABLE_SHARED and
SHLIBPATH_VAR in lit.site.cfg not only in the autoconf build, but also
in a cmake one.
llvm-svn: 98171
2010-03-10 18:41:59 +00:00
Richard Osborne
66839831a7
The backend now makes a reasonable job of targeting lmul / macc
...
llvm-svn: 98169
2010-03-10 18:14:47 +00:00
Richard Osborne
54a2c32670
Handle MVT::i64 type in DAG combine for ISD::ADD. Fold 64 bit
...
expression add(add(mul(x,y),a),b) -> lmul(x,y,a,b) if all
operands are zero extended.
llvm-svn: 98168
2010-03-10 18:12:27 +00:00
Daniel Dunbar
7e3283c055
Remove unneeded includes.
...
llvm-svn: 98167
2010-03-10 17:56:05 +00:00
Bob Wilson
dfebf1ffac
Testcase for pr6552. I changed the code to use "ip" instead of "fp" because
...
the "fp" register name is not valid on Darwin, and the "ip" register name was
broken for all ARM targets.
llvm-svn: 98166
2010-03-10 17:54:11 +00:00
Richard Osborne
c99b9b2193
Fix checking of intermediates having one use in isADDADDMUL
...
llvm-svn: 98164
2010-03-10 17:16:29 +00:00
Richard Osborne
5a457de4b2
Extract recognition of patterns such as add(add(mul(x,y),a),b)
...
into a seperate function.
llvm-svn: 98162
2010-03-10 17:10:35 +00:00
Richard Osborne
11ec7ee125
Fix thinko.
...
llvm-svn: 98158
2010-03-10 16:27:11 +00:00
Richard Osborne
1a396d53ed
Fold add(add(mul(x,y),a),b) -> lmul(x,y,a,b) if the intermediate
...
results are unused elsewhere.
llvm-svn: 98157
2010-03-10 16:19:31 +00:00
Benjamin Kramer
74ca599a73
Remove duplicated code. No functionality change.
...
llvm-svn: 98156
2010-03-10 16:04:20 +00:00
Dale Johannesen
8340cc0d6c
Fix a bug in DEBUG_VALUE handling Devang ran into.
...
I'll get this loop right yet.
llvm-svn: 98155
2010-03-10 15:06:26 +00:00
Richard Osborne
f57aea3d38
Prefer LMUL to MACCU as LMUL has no tied operands.
...
llvm-svn: 98153
2010-03-10 13:27:10 +00:00
Richard Osborne
0012bc1e41
Custom lower (S|U)MUL_LOHI -> MACC(S|U)
...
llvm-svn: 98152
2010-03-10 13:20:07 +00:00
Richard Osborne
ef00c1bd6f
Fix indentation
...
llvm-svn: 98151
2010-03-10 11:42:05 +00:00
Richard Osborne
54dfa01adc
Lower add (mul a, b), c into MACCU / MACCS nodes which translate
...
directly to the maccu / maccs instructions. We handle this in
ExpandADDSUB since after type legalisation it is messy to
recognise these operations.
llvm-svn: 98150
2010-03-10 11:41:08 +00:00
Richard Osborne
e35eabdd69
Convert test to FileCheck.
...
llvm-svn: 98148
2010-03-10 11:24:03 +00:00
Chris Lattner
71c30c164f
move three lowering hooks from MAI to TLOF and make one of them
...
semantic instead of syntactic. This completes MCization of
darwin/x86[-64]!
llvm-svn: 98145
2010-03-10 07:20:42 +00:00
Evan Cheng
72811e8714
Fix typo.
...
llvm-svn: 98142
2010-03-10 07:07:55 +00:00
Evan Cheng
a3b6739749
Unbreak test on Linux.
...
llvm-svn: 98141
2010-03-10 07:07:45 +00:00
Dale Johannesen
5ebe0c1e13
This survived a bootstrap, so let's try 98104 again.
...
llvm-svn: 98137
2010-03-10 05:45:47 +00:00
Evan Cheng
80ad113731
Enable machine cse pass.
...
llvm-svn: 98132
2010-03-10 03:07:41 +00:00
Chris Lattner
eec9bf1198
mcize the rest of EH emission, only one more directive missing
...
for darwin/x86 to be completely mcized.
llvm-svn: 98130
2010-03-10 02:48:06 +00:00
Chris Lattner
a26fbe4d68
add missing filename!
...
llvm-svn: 98125
2010-03-10 02:29:31 +00:00
Chris Lattner
ac2361a9b0
set the temporary bit on MCSymbols correctly.
...
llvm-svn: 98124
2010-03-10 02:25:11 +00:00
Dan Gohman
b7e0b87441
Fix a comment.
...
llvm-svn: 98122
2010-03-10 02:18:48 +00:00
Evan Cheng
4c5f7a7f5e
Add a couple more heuristics to neuter machine cse some more.
...
1. Be careful with cse "cheap" expressions. e.g. constant materialization. Only cse them when the common expression is local or in a direct predecessor. We don't want cse of cheap instruction causing other expressions to be spilled.
2. Watch out for the case where the expression doesn't itself uses a virtual register. e.g. lea of frame object. If the common expression itself is used by copies (common for passing addresses to function calls), don't perform the cse. Since these expressions do not use a register, it creates a live range but doesn't close any, we want to be very careful with increasing register pressure.
Note these are heuristics so machine cse doesn't make register allocator unhappy. Once we have proper live range splitting and re-materialization support in place, these should be evaluated again.
Now machine cse is almost always a win on llvm nightly tests on x86 and x86_64.
llvm-svn: 98121
2010-03-10 02:12:03 +00:00
Daniel Dunbar
46ed804180
MC/Mach-O: Resolve a FIXME; these relocation types are no longer semanticaly different.
...
llvm-svn: 98120
2010-03-10 02:10:29 +00:00
Dan Gohman
16c678c8de
Clarify the documentation for MachineFunctionPasses.
...
llvm-svn: 98119
2010-03-10 01:29:39 +00:00
Chris Lattner
b973ea88b5
eliminate MCContext::CreateSymbol and CreateTemporarySymbol.
...
Add a new GetOrCreateTemporarySymbol method and a version that
takes a twine.
llvm-svn: 98118
2010-03-10 01:29:27 +00:00
Chris Lattner
b245dfb408
inline away a form of IsPCRelative, eliminating the
...
dead IsPCRel argument.
llvm-svn: 98117
2010-03-10 01:17:49 +00:00
Chris Lattner
7e998b7363
add some fixme's for MCizing. EH still has a few things that
...
need to be MCized, but the last debug info thing are LEB and
cygwin specific (which the MC api doesn't support yet) and
one specific form of EmitReference which I'll tackle next.
llvm-svn: 98116
2010-03-10 01:04:13 +00:00
Daniel Dunbar
27b984ac85
MC/Mach-O: Use the SECTDIFF relocation type for (A - B + constant) where A is external.
...
- I'm not sure why, but this is what 'as' does.
llvm-svn: 98115
2010-03-10 00:58:25 +00:00
Jim Grosbach
e620178436
Clear up the last (famous last words) frame index value reuse issues for Thumb1.
...
llvm-svn: 98109
2010-03-10 00:13:42 +00:00
Dale Johannesen
bf9a4ad1ce
Speculatively revert 98104; could be what's causing crashes
...
llvm-svn: 98108
2010-03-10 00:11:34 +00:00
Chris Lattner
caea64b098
mcize uses of PrintRelDirective and eliminate it.
...
llvm-svn: 98107
2010-03-10 00:09:21 +00:00
Chris Lattner
1df0cf40ea
inline the bool form of PrintRelDirective away, leaving just the unsigned form.
...
llvm-svn: 98106
2010-03-09 23:54:52 +00:00
Chris Lattner
566cae9086
eliminate EOL, adding all comments with the OutStreamer.AddComment
...
method. With this, comments should end up on the same lines as the .byte
directives (for example) and we now get no output with:
$ llc CodeGen/X86/2009-02-12-DebugInfoVLA.ll -o - -filetype=null -asm-verbose
woot.
llvm-svn: 98105
2010-03-09 23:52:58 +00:00
Dale Johannesen
d32ab20b71
Ever more complicated DEBUG_VALUE fixes for branch folding.
...
llvm-svn: 98104
2010-03-09 23:52:37 +00:00
Dan Gohman
69451a0950
Avoid analyzing instructions in blocks not reachable from the entry block.
...
They are lots of trouble, and they don't matter. This fixes PR6559.
llvm-svn: 98103
2010-03-09 23:46:50 +00:00
Chris Lattner
3d72a678de
eliminate a bunch of \n's that are being printed to O. Next up is to kill
...
off "EOL".
llvm-svn: 98102
2010-03-09 23:38:23 +00:00
Chris Lattner
1b6d60d1c0
convert the non-"ispcrel" case of EmitReference to MC,
...
significant debug info testcases are now all going through
MCStreamer, though they print a lot of extraneous newlines to "O".
llvm-svn: 98101
2010-03-09 23:19:15 +00:00
Chris Lattner
aab52840af
make the NullStreamer set the section on a label when emitted so that isDefined() works.
...
llvm-svn: 98100
2010-03-09 23:12:18 +00:00
Jakob Stoklund Olesen
b495cad7ca
Try to keep the cached inliner costs around for a bit longer for big functions.
...
The Caller cost info would be reset everytime a callee was inlined. If the
caller has lots of calls and there is some mutual recursion going on, the
caller cost info could be calculated many times.
This patch reduces inliner runtime from 240s to 0.5s for a function with 20000
small function calls.
This is a more conservative version of r98089 that doesn't break the clang
test CodeGenCXX/temp-order.cpp. That test relies on rather extreme inlining
for constant folding.
llvm-svn: 98099
2010-03-09 23:02:17 +00:00
Daniel Dunbar
b70c2f795e
MC/X86: Rename alternate spellings of ADD{8,16,32} and mark as "code gen only" so they don't get selected by the asm matcher.
...
llvm-svn: 98098
2010-03-09 22:50:46 +00:00
Daniel Dunbar
f5b6a1118d
MC/X86: Rename alternate spellings of CMP{8,16,32} and mark as "code gen only" so they don't get selected by the asm matcher.
...
llvm-svn: 98097
2010-03-09 22:50:40 +00:00
Chandler Carruth
25fcb61172
Continue propagating the GoogleTest flags until we can update our version to
...
eliminate this problem. This will hopefully let us make progress on Linux
bootstrapping.
llvm-svn: 98095
2010-03-09 22:45:10 +00:00
Jakob Stoklund Olesen
4497475905
Revert r98089, it was breaking a clang test.
...
llvm-svn: 98094
2010-03-09 22:43:37 +00:00
Jakob Stoklund Olesen
741dec43e4
Try to keep the cached inliner costs around for a bit longer for big functions.
...
The Caller cost info would be reset everytime a callee was inlined. If the
caller has lots of calls and there is some mutual recursion going on, the
caller cost info could be calculated many times.
This patch reduces inliner runtime from 240s to 0.5s for a function with 20000
small function calls.
llvm-svn: 98089
2010-03-09 22:17:11 +00:00
Jakob Stoklund Olesen
5fba36cc1b
Permit inlining into huge functions. This heuristic is ancient, and inlining
...
can sometimes help reduce function size.
llvm-svn: 98088
2010-03-09 22:17:06 +00:00
Jim Grosbach
fae913adf8
Change the Value argument to eliminateFrameIndex to a type-tagged value. This
...
is preparatory to having PEI's scavenged frame index value reuse logic
properly distinguish types of frame values (e.g., whether the value is
stack-pointer relative or frame-pointer relative).
No functionality change.
llvm-svn: 98086
2010-03-09 21:45:49 +00:00
Johnny Chen
15804db55c
MSR (Move to Special Register from ARM core register) requires a mask to specify
...
what fields of the CPSR or SPSR are affected.
llvm-svn: 98085
2010-03-09 21:39:34 +00:00
Daniel Dunbar
3dde457b94
MC/Mach-O: For PCrel relocations, we need to compensate for the PCrel adjustment when determining if we need a scattered relocation.
...
llvm-svn: 98082
2010-03-09 21:27:58 +00:00
Daniel Dunbar
d49794e703
MC/Mach-O: Also set the PCrel bit in the second half of paired relocation entries.
...
llvm-svn: 98081
2010-03-09 21:27:47 +00:00
Daniel Dunbar
4680000b27
MC/Mach-O: Don't generate relocations for PCrel fixups to local labels.
...
llvm-svn: 98080
2010-03-09 21:27:30 +00:00
Dale Johannesen
90eab67320
The address of an indirect call must be in R12 on Darwin.
...
Make it so. (This patch is in LowerCall_Darwin, which seems
to be used by SVR4 code as well; since that doesn't belong here,
I haven't worried about this case.)
llvm-svn: 98077
2010-03-09 20:15:42 +00:00
Chandler Carruth
28d5f76f85
Consolidate GoogleTest make options and duplicate them to its own makefile.
...
llvm-svn: 98074
2010-03-09 19:24:49 +00:00
Jim Grosbach
31f275e63c
scavenged frame index value re-use gets confused when more than one base
...
register is involved for thumb1. Work around this for the moment by only
re-using SP-relative offsets. This is temporary 'til the code can distinguish
multiple base registers.
llvm-svn: 98071
2010-03-09 19:07:28 +00:00
Bill Wendling
9481181d40
The ARM EH experiment worked!
...
Place the LSDA into the TEXT section for ARM platforms. This involves making the
encoding indirect, pcrel, and sdata4 instead of an absolute pointer. The
references to the type infos are then non-lazy pointers. Revision 98019 changed
the encoding of non-lazy pointers to add the symbol to the non-lazy pointer
definition if it's a local symbol (otherwise, it's external and set to '0' so
that the loader can adjust it to the real value). This paved the way for this
change to work on ARM.
llvm-svn: 98068
2010-03-09 18:31:07 +00:00
Richard Osborne
c420c4cb4e
In cases where the carry / borrow unused converted ladd / lsub
...
to an add or a sub.
llvm-svn: 98059
2010-03-09 16:34:25 +00:00
Richard Osborne
c5ff63d70f
Canonicalize ladd constant to RHS.
...
llvm-svn: 98058
2010-03-09 16:13:57 +00:00
Richard Osborne
f4e76cf44d
Add DAG combine for ladd / lsub.
...
llvm-svn: 98057
2010-03-09 16:07:47 +00:00
Duncan Sands
5674c34780
Attempt to fix random build failures seen when doing highly
...
parallel builds: the gold plugin fails to link because the lto
library is in the middle of being written out by the linker.
llvm-svn: 98054
2010-03-09 09:03:21 +00:00
Evan Cheng
51063739a4
Allow more cross-rc coalescing.
...
llvm-svn: 98048
2010-03-09 06:38:17 +00:00
Chris Lattner
ba35a67062
reapply r98035:
...
Now that setStartLabel takes an MCSymbol, we can de-ID'ize
beginScope and RecordSourceLine.
llvm-svn: 98047
2010-03-09 04:54:43 +00:00
Chris Lattner
54a6876821
add some extra checks. I'm not sure why, but this does unbreak a
...
failure remaining on mainline.
llvm-svn: 98046
2010-03-09 04:48:35 +00:00
Evan Cheng
251787686b
Revert accidental commit.
...
llvm-svn: 98045
2010-03-09 04:04:38 +00:00
Jakob Stoklund Olesen
7c699f92cd
Don't do illegal cross-class coalescing.
...
llvm-svn: 98044
2010-03-09 03:56:06 +00:00
Evan Cheng
19e44b4510
- Make the machine cse dumb coalescer (as opposed to the more awesome simple
...
coalescer) handle sub-register classes.
- Add heuristics to avoid non-profitable cse. Given the current lack of live
range splitting, avoid cse when an expression has PHI use and the would be
new use is in a BB where the expression wasn't already being used.
llvm-svn: 98043
2010-03-09 03:21:12 +00:00
Dan Gohman
772952f46e
Don't try to fold V_SET0 and V_SETALLONES to loads in medium and
...
large code models.
llvm-svn: 98042
2010-03-09 03:01:40 +00:00
Bill Wendling
46ffefc66c
This is part of an LLC-beta test used to test <rdar://problem/6804645>. Please
...
bear with the awful code. It won't last in its current state beyond tonight.
llvm-svn: 98040
2010-03-09 02:46:12 +00:00
Eric Christopher
66194fbf86
Speculatively revert r98035. It appears to have caused a set of buildbot
...
failures.
llvm-svn: 98039
2010-03-09 02:36:31 +00:00
Dan Gohman
52cc041ee5
Attempt to make this debug output meaningful, both in the case of
...
multibyte opcodes and in the case of multiple scopes.
llvm-svn: 98036
2010-03-09 02:15:05 +00:00
Chris Lattner
06c5e9060c
Now that setStartLabel takes an MCSymbol, we can de-ID'ize
...
beginScope and RecordSourceLine.
llvm-svn: 98035
2010-03-09 02:08:02 +00:00
Chris Lattner
e13c37232a
change DbgScope to keep track of the start/end label as MCSymbol*
...
now that the dependence on ID is removed from MMI.
llvm-svn: 98034
2010-03-09 01:58:53 +00:00
Dan Gohman
93452cebda
Make isLCSSA ignore uses in blocks not reachable from the entry block,
...
as LCSSA no longer transforms such uses.
llvm-svn: 98033
2010-03-09 01:53:33 +00:00
Chris Lattner
a552246b3d
remove a useless optimization: now that label replacement never
...
happens, the start/end of a scope can never be the same.
llvm-svn: 98032
2010-03-09 01:52:43 +00:00
Chris Lattner
c3b70f636f
strength reduce MMI::MappedLabel to MMI::isLabelDeleted,
...
and add a FIXME about how we are eventually going to zap this
lookup table once mc world domination is complete.
llvm-svn: 98031
2010-03-09 01:51:43 +00:00
Chris Lattner
5ca47a4bdc
inline RemapLabel into its only caller and simplify.
...
llvm-svn: 98029
2010-03-09 01:29:59 +00:00
Daniel Dunbar
cb01210eca
MC/Mach-O: Tweak .dump() formatting.
...
llvm-svn: 98028
2010-03-09 01:12:23 +00:00
Daniel Dunbar
97d64717c4
MC/Mach-O: Don't adjust section sizes when aligning zero fill sections, just pad the address.
...
llvm-svn: 98027
2010-03-09 01:12:20 +00:00
Dale Johannesen
ace75dff75
Another place where debug info affected codegen.
...
llvm-svn: 98026
2010-03-09 01:08:11 +00:00
Chris Lattner
9e57c676dd
mcstreamerize AsmPrinter::printLabel.
...
llvm-svn: 98025
2010-03-09 01:02:30 +00:00
Jakob Stoklund Olesen
d62c2f554c
Add inlining threshold to log output.
...
llvm-svn: 98024
2010-03-09 00:59:53 +00:00
Jakob Stoklund Olesen
1d9eb4667d
Disable physical register coalescing when the number of live ranges for the
...
physreg becomes ridiculously high.
std::upper_bound may be log(N), but for sufficiently large live intervals, it
becomes log(N)*cachemiss = a long long time.
This patch improves coalescer time by 4500x for a function with 20000
function calls. The generated code is different, but not significantly worse -
the allocator hints are almost as good as physreg coalescing anyway.
llvm-svn: 98023
2010-03-09 00:59:48 +00:00
Devang Patel
59445dbf78
Start using DIFile. See updated SourceLevelDebugging.html for more information.
...
This patch updates LLVMDebugVersion to 8.
Debug info descriptors encoded using LLVMDebugVersion 7 is supported.
Corresponding llvmgcc and clang FE commits are required.
llvm-svn: 98020
2010-03-09 00:44:10 +00:00
Bill Wendling
ffba5fafb6
Print blank line and clear stubs vector.
...
llvm-svn: 98019
2010-03-09 00:43:34 +00:00
Bill Wendling
f1eae222c9
MC-ize the stub printing in ARM.
...
llvm-svn: 98018
2010-03-09 00:40:17 +00:00
Chris Lattner
b14490d912
add a EmitSymbolValue convenience method to MCStreamer.
...
llvm-svn: 98017
2010-03-09 00:39:24 +00:00
Chris Lattner
085b65283c
make InlineInfoLabels hold MCSymbol*'s, avoiding
...
recomputation of the labels.
llvm-svn: 98016
2010-03-09 00:31:02 +00:00
Chris Lattner
53d6d1e87d
mc'ize the last use of PrintLabelName and eliminate PrintLabelName.
...
llvm-svn: 98015
2010-03-09 00:26:09 +00:00
Chris Lattner
292ec6c299
eliminate an argument from PrintRelDirective, sinking
...
the one special case into EmitSectionOffset. MCize
the non-special case in EmitSectionOffset.
llvm-svn: 98014
2010-03-09 00:17:58 +00:00
Dan Gohman
f6fb1e0d93
Print the correct index in the "match failed at index" message.
...
llvm-svn: 98013
2010-03-09 00:07:36 +00:00
Chris Lattner
b242ae6dcc
remove the suffix form of PrintLabelName, which was only
...
used for 'flavor'.
llvm-svn: 98012
2010-03-09 00:00:57 +00:00
Chris Lattner
4d728127fb
now that the debug and eh emitters use a common .set counter,
...
we can eliminate "flavor".
llvm-svn: 98011
2010-03-09 00:00:15 +00:00
Chris Lattner
9889c1eb9e
move .set generation out of DwarfPrinter into AsmPrinter and
...
MCize it.
llvm-svn: 98010
2010-03-08 23:58:37 +00:00
Evan Cheng
c9e8621268
Don't waste time trying to CSE labels, phis, inline asm. Definitely avoid cse implicit-def for obvious performance reason.
...
llvm-svn: 98009
2010-03-08 23:49:12 +00:00
Evan Cheng
6ec41ee33c
Restrict machine cse to really trivial coalescing. Leave the heavy lifting to a real coalescer.
...
llvm-svn: 98007
2010-03-08 23:28:08 +00:00
Chris Lattner
27a9732450
simplify EmitSectionOffset to always use .set if it is
...
available, the only thing this affects is that we produce
.set in one case we didn't before, which shouldn't harm
anything. Make EmitSectionOffset call EmitDifference
instead of duplicating it.
llvm-svn: 98005
2010-03-08 23:23:25 +00:00
Chris Lattner
d802615d0c
don't reset defaults.
...
llvm-svn: 98004
2010-03-08 23:18:21 +00:00
Chris Lattner
449a9ff14b
Remove a version of EmitDifference.
...
llvm-svn: 98002
2010-03-08 23:02:59 +00:00
Bob Wilson
0bfbd9b68c
Fix a crash compiling 254.gap for Thumb2. The Thumb2 add/sub with 12-bit
...
immediate instructions cannot set the condition codes, so they do not have
the extra cc_out operand. We hit an assertion during tail duplication
because the instruction being duplicated had more operands that expected.
llvm-svn: 98001
2010-03-08 22:56:15 +00:00
Evan Cheng
4f2fd2d2be
Re-commit 97860 with fix. getMallocAllocatedType may return null.
...
llvm-svn: 98000
2010-03-08 22:54:36 +00:00
Chris Lattner
ee20b5f236
eliminate a form of PrintLabelName.
...
llvm-svn: 97999
2010-03-08 22:52:49 +00:00
Chris Lattner
3c081995f6
remove another form of EmitReference.
...
llvm-svn: 97998
2010-03-08 22:50:36 +00:00
Chris Lattner
b779eb6a1d
eliminate the non-MCSymbol versions of EmitReference.
...
llvm-svn: 97997
2010-03-08 22:47:57 +00:00
Chris Lattner
722714dde2
mc'ize EmitLabel.
...
llvm-svn: 97996
2010-03-08 22:44:40 +00:00
Chris Lattner
8dcf41ed66
merge DIEObjectLabel and DIEDwarfLabel into DIELabel.
...
Yes, DIE you fiendish labels, die all of you.
llvm-svn: 97995
2010-03-08 22:31:46 +00:00
Devang Patel
2e520f6378
Introduce DIFile. This will be used to represent header files and source file(s) in debug info.
...
llvm-svn: 97994
2010-03-08 22:27:22 +00:00
Chris Lattner
bc9210cb70
elimiante the DWLabel class, using MCSymbol instead. Start
...
switching some stuff over to passing around MCSymbol* instead
of stem+ID.
llvm-svn: 97993
2010-03-08 22:23:36 +00:00
Kevin Enderby
d2030e38a6
Fix the vmxon entry in the X86InstrInfo.td so it has the correct prefix bytes
...
for the encoding and is not the same as vmptrld.
llvm-svn: 97992
2010-03-08 22:17:26 +00:00
Daniel Dunbar
3a3f472cb4
MC/Macho-O: Align the zerofill section itself to the maximum alignment.
...
llvm-svn: 97991
2010-03-08 22:03:42 +00:00
Devang Patel
8119fe87d8
Derive DIType from DIScope. This simplifies getContext() where for members the context is a type. This also eliminates need of CompileUnitMaps maintained by dwarf writer.
...
llvm-svn: 97990
2010-03-08 22:02:50 +00:00
Devang Patel
4bd5f8ceca
Remove DbgNode checks in constructor. Debug descriptors are intended to be light weight wrappers.
...
llvm-svn: 97988
2010-03-08 21:32:10 +00:00
Daniel Dunbar
6622fe7873
MC/Mach-O: Fix address compution for zero fill sections.
...
llvm-svn: 97984
2010-03-08 21:10:42 +00:00
Daniel Dunbar
c6ac7940d9
MC/Mach-O: Error out instead of crashing on invalid scattered relocation expressions.
...
llvm-svn: 97983
2010-03-08 21:10:39 +00:00
Daniel Dunbar
b59f7734b9
X86: Fix encoding for TEST{8,16,32}rr.
...
llvm-svn: 97982
2010-03-08 21:10:36 +00:00
Evan Cheng
5967649780
Add documentation on sibling call optimization. Rename tailcall2.ll test to sibcall.ll.
...
llvm-svn: 97980
2010-03-08 21:05:02 +00:00
Devang Patel
03efa475d1
isNull() is not used any more.
...
llvm-svn: 97979
2010-03-08 21:00:27 +00:00
Devang Patel
3b548aa8e2
Avoid using DIDescriptor.isNull().
...
This is a first step towards eliminating checks in Descriptor constructors.
llvm-svn: 97975
2010-03-08 20:52:55 +00:00
Andrew Lenharth
2e8b9b5ad3
Iterator traits and swap. closes PR6548 and PR6549
...
llvm-svn: 97974
2010-03-08 20:45:52 +00:00
Erick Tryzelaar
dc7e85fec6
Don't always run the ocaml kaleidoscope tutorials.
...
llvm-svn: 97973
2010-03-08 20:07:32 +00:00
John McCall
953838d0d5
Revert r97726 and r97728 at ddunbar's request; we want to solve this
...
some other way when it comes to be necessary.
llvm-svn: 97972
2010-03-08 20:02:05 +00:00
Erick Tryzelaar
f11976538e
Add OCaml tutorial to the examples.
...
llvm-svn: 97966
2010-03-08 19:32:27 +00:00
Erick Tryzelaar
b8c11eb36b
Update the OCaml Kaleidoscope tutorial.
...
llvm-svn: 97965
2010-03-08 19:32:18 +00:00
Devang Patel
bc97f6b757
Revert r97947.
...
llvm-svn: 97963
2010-03-08 19:20:38 +00:00
Chris Lattner
e77f993262
disambiguate some types, add a fixme about some
...
inconsistent intrinsics.
llvm-svn: 97959
2010-03-08 18:59:49 +00:00
Chris Lattner
d8045649a6
fix some more ambiguous patterns, remove another nontemporalstore
...
pattern which is broken (source and address swapped).
llvm-svn: 97958
2010-03-08 18:57:56 +00:00
Chris Lattner
a6d842fac0
Correct immediate sizes.
...
llvm-svn: 97957
2010-03-08 18:55:15 +00:00
Chris Lattner
6742f1f338
fix a type compatibility bug. imm is i32 in the input
...
pattern, not i64.
llvm-svn: 97956
2010-03-08 18:52:55 +00:00
Chris Lattner
b8a7427636
fix a bunch of partially ambiguous patterns on ARM. As an
...
example, this:
(set DPR:$dst, (fsub (fneg (fmul DPR:$a, DPR:$b)), DPR:$dstin))
is ambiguous because DPR contains both f64 and v2f32. tblgen
currently accidentally picks f64 because it's first in the
regclass.
llvm-svn: 97955
2010-03-08 18:51:21 +00:00
Chris Lattner
dac58bd094
Fix a bunch of ambiguous patterns which tblgen happens to infer types
...
for, due to a bug.
llvm-svn: 97953
2010-03-08 18:44:04 +00:00
Chris Lattner
e96802e6ed
Node arguments to type casts can have names too. This code
...
needs to be majorly refactored, but this spot bugfix allows
things like:
def vmrghw_shuffle : PatFrag<(ops node:$lhs, node:$rhs),
(vector_shuffle (v4i32 node:$lhs), node:$rhs), [{
...
llvm-svn: 97952
2010-03-08 18:36:19 +00:00
Chris Lattner
2b7ecfbe40
tidy up
...
llvm-svn: 97950
2010-03-08 18:29:38 +00:00
Devang Patel
fe28599f6f
Avoid using DIDescriptor.isNull().
...
This is a first step towards eliminating unncessary constructor checks in light weight DIDescriptor wrappers.
llvm-svn: 97947
2010-03-08 18:25:48 +00:00
Dale Johannesen
30488c636d
Add Order to SDDbgValue
...
llvm-svn: 97939
2010-03-08 05:39:50 +00:00
Dale Johannesen
0eebdbb325
Fix dbg value handling in tail merging.
...
llvm-svn: 97938
2010-03-08 05:38:13 +00:00
Chris Lattner
ca8d590c28
remove a non-temporal store pattern which is not tested and
...
could never have matched because the operand list was backwards.
llvm-svn: 97933
2010-03-08 03:18:28 +00:00
Douglas Gregor
9abb538be0
Revert r97917, which was causing Clang Debug self-host failures.
...
llvm-svn: 97932
2010-03-08 02:58:37 +00:00
Jeffrey Yasskin
5cdbd7064c
Roll back r97918 again. Just configuring against llvm-gcc wasn't enough to run
...
the FrontendC* tests. :(
llvm-svn: 97921
2010-03-07 19:26:40 +00:00
Jeffrey Yasskin
aba6ea8254
Reapply r97788 to free MDNodes when the LLVMContext is destroyed. It
...
bootstraps llvm-gcc this time.
llvm-svn: 97918
2010-03-07 18:46:57 +00:00
Jeffrey Yasskin
37a0372fc4
Roll r97906 forward again, without double-deleting CompileUnit::IndexTyDie.
...
llvm-svn: 97917
2010-03-07 17:10:13 +00:00
Tobias Grosser
62892a8680
Add findNearestCommonDominator() for PostDominators.
...
Add a missing interface to be able to call findNearestCommonDominator
for a PostDominanceTree. The function itself is already implemented in
DominatorTreeBase. The interface however was only added to the
DominatorTree class, but not the PostDominatorClass.
llvm-svn: 97915
2010-03-07 11:15:04 +00:00
Chris Lattner
28dc6c12c3
Use Other as a sentinel instead of iAny.
...
llvm-svn: 97914
2010-03-07 07:45:08 +00:00
Chris Lattner
c95d58d31a
turn off debug spew
...
llvm-svn: 97912
2010-03-07 07:21:24 +00:00
Chris Lattner
a160389290
more factoring.
...
llvm-svn: 97911
2010-03-07 07:20:49 +00:00
Jeffrey Yasskin
7068bdba50
_2_ gcc crashes, ah, ah, ah...
...
(Rolling back r97906.)
llvm-svn: 97909
2010-03-07 07:16:49 +00:00
Chris Lattner
b9071a2d5d
teach tblgen to be more aggressive when factoring CheckType nodes.
...
Now it will factor things like this:
CheckType i32
...
CheckOpcode ISD::AND
CheckType i64
...
into:
SwitchType:
i32: ...
i64:
CheckOpcode ISD::AND
...
This shrinks hte table by a few bytes, nothing spectacular.
llvm-svn: 97908
2010-03-07 07:01:28 +00:00
Jeffrey Yasskin
413721b050
Avoid leaking CompileUnits and DbgScopes from DwarfDebug. Leaks found by Valgrind!
...
llvm-svn: 97906
2010-03-07 06:55:35 +00:00
Chris Lattner
9c791d872a
add some helper functions and implement isContradictory
...
for CheckValueTypeMatcher. The isContradictory implementation
helps us factor better, shrinking x86 table from 79144 -> 78896
bytes.
llvm-svn: 97905
2010-03-07 06:29:26 +00:00
Chris Lattner
ef2f8047fa
tidy up
...
llvm-svn: 97895
2010-03-07 04:28:09 +00:00
Wesley Peck
1fb4edc05d
Re-committing the failed r97807 commit with changes to eliminate warnings.
...
llvm-svn: 97891
2010-03-06 23:23:12 +00:00
Nick Lewycky
4b5e95426d
Add verification of union types.
...
llvm-svn: 97889
2010-03-06 20:26:48 +00:00
Anton Korobeynikov
c9c8b2713c
Describe what's going on with mingw alloca and why do we need separate instruction.
...
llvm-svn: 97888
2010-03-06 20:07:32 +00:00
Anton Korobeynikov
bf16a17fc1
Initial bits of ARMv4-only support.
...
Patch by John Tytgat!
llvm-svn: 97886
2010-03-06 19:39:36 +00:00
Anton Korobeynikov
d5e3fd6dc8
Lower dynamic stack allocation on mingw32 to separate instruction.
...
We cannot use a normal call here since it has extra unmodelled side
effects (it changes stack pointer). This should fix PR5292.
llvm-svn: 97884
2010-03-06 19:32:29 +00:00
Chris Lattner
4c1e4db3ff
make APFloat::toString be const.
...
llvm-svn: 97883
2010-03-06 19:20:13 +00:00
Chris Lattner
1e93b96117
disable this for mingw as well, we really need a 'has no dynamic linking' predicate.
...
llvm-svn: 97882
2010-03-06 18:54:37 +00:00
Anton Korobeynikov
6f5523aa8b
Do not use '&' prefix for globals when register base field is non-zero, otherwise msp430-as will silently miscompile the code (TI's assembler report an error though).
...
This fixes PR6349
llvm-svn: 97877
2010-03-06 11:41:12 +00:00
Eric Christopher
1810d77cb4
Let the fallthrough handle whether or not we've changed anything
...
before we try to optimize.
llvm-svn: 97876
2010-03-06 10:59:25 +00:00
Eric Christopher
a7fb58f5f5
Migrate _chk call lowering from SimplifyLibCalls to InstCombine. Stub
...
out the remainder of the calls that we should lower in some way and
move the tests to the new correct directory. Fix up tests that are now
optimized more than they were before by -instcombine.
llvm-svn: 97875
2010-03-06 10:50:38 +00:00
Rafael Espindola
7f1e85f331
Add static methods to handle Linkage Types.
...
llvm-svn: 97871
2010-03-06 07:22:39 +00:00
Chris Lattner
29146d417e
clean this up.
...
llvm-svn: 97870
2010-03-06 07:02:28 +00:00
Chris Lattner
4279a078a5
revert r97807, it introduced build warnings.
...
llvm-svn: 97869
2010-03-06 04:32:46 +00:00
Jim Grosbach
24c9b550b2
Thumb1 epilogue code generation needs to take into account that callee-saved
...
registers may be restored via a pop instruction, not just a tRestore.
This fixes nightly test 471.omnetep for Thumb1.
llvm-svn: 97867
2010-03-06 03:28:39 +00:00
Eric Christopher
d8b43d0e59
Temporarily revert:
...
Log:
Transform @llvm.objectsize to integer if the argument is a result of malloc of known size.
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/trunk/test/Transforms/InstCombine/objsize.ll
It appears to be causing swb and nightly test failures.
llvm-svn: 97866
2010-03-06 03:11:35 +00:00
Dale Johannesen
066b8ea590
Fix another case where LSR was affected by debug info.
...
llvm-svn: 97865
2010-03-06 02:45:26 +00:00
Evan Cheng
0f5f54784a
Don't update physical register def.
...
llvm-svn: 97861
2010-03-06 01:14:19 +00:00
Evan Cheng
afdc7d3aab
Transform @llvm.objectsize to integer if the argument is a result of malloc of known size.
...
llvm-svn: 97860
2010-03-06 01:01:42 +00:00
Erick Tryzelaar
381268e629
Add a LLVMWriteBitcodeToFD that exposes the raw_fd_ostream options.
...
llvm-svn: 97858
2010-03-06 00:30:06 +00:00
Erick Tryzelaar
dc78d16a03
Whoops, the old LLVMWriteBitcodeToFileHandle closed the stream.
...
Luckily this never was released.
llvm-svn: 97857
2010-03-06 00:30:01 +00:00
Erick Tryzelaar
b2e144ddff
LLVMWriteBitcodeToFileHandle should work on all architectures now.
...
llvm-svn: 97856
2010-03-06 00:29:58 +00:00
Dale Johannesen
10a77adede
Add some new bits of debug info handling. No
...
functional change yet.
llvm-svn: 97855
2010-03-06 00:03:23 +00:00
Dan Gohman
14e450f595
Reapply r97778 and r97779, enabled only for unsigned i64 to f64
...
conversions.
llvm-svn: 97854
2010-03-06 00:00:55 +00:00
Devang Patel
0a3d71af52
Test case for r97851.
...
llvm-svn: 97852
2010-03-05 23:35:04 +00:00
Ted Kremenek
65bb311629
Update CMake build.
...
llvm-svn: 97846
2010-03-05 22:34:16 +00:00
Charles Davis
8545afe0b0
Don't emit global symbols into the (__TEXT,__ustring) section on Darwin. This
...
is a workaround for <rdar://problem/7672401/> (which I filed).
This let's us build Wine on Darwin, and it gets the Qt build there a little bit
further (so Doug says).
llvm-svn: 97845
2010-03-05 22:28:45 +00:00
Eric Christopher
87abfc506f
Move SimplifyLibCalls's LibCall builders to a separate file so they
...
can be used in more places. Add an argument for the TargetData that
most of them need. Update for the getInt8PtrTy() change. Should be
no functionality change.
llvm-svn: 97844
2010-03-05 22:25:30 +00:00
Eric Christopher
27d54d9d3b
Add support for an i8* type accessor.
...
llvm-svn: 97841
2010-03-05 22:21:58 +00:00
Jakob Stoklund Olesen
2664d295cb
Better handling of dead super registers in LiveVariables. We used to do this:
...
CALL ... %RAX<imp-def>
... [not using %RAX]
%EAX = ..., %RAX<imp-use, kill>
RET %EAX<imp-use,kill>
Now we do this:
CALL ... %RAX<imp-def, dead>
... [not using %RAX]
%EAX = ...
RET %EAX<imp-use,kill>
By not artificially keeping %RAX alive, we lower register pressure a bit.
The correct number of instructions for 2008-08-05-SpillerBug.ll is obviously
55, anybody can see that. Sheesh.
llvm-svn: 97838
2010-03-05 21:49:17 +00:00
Jakob Stoklund Olesen
8c5b8db5cd
We don't really care about correct register liveness information after the
...
post-ra scheduler has run. Disable the verifier checks that late in the game.
llvm-svn: 97837
2010-03-05 21:49:13 +00:00
Jakob Stoklund Olesen
b0503beff1
Avoid creating bad PHI instructions when BR is being const-folded.
...
llvm-svn: 97836
2010-03-05 21:49:10 +00:00
Dale Johannesen
f5cc1cdc65
Fix a case where LSR is sensitive to debug info.
...
llvm-svn: 97830
2010-03-05 21:12:40 +00:00
Evan Cheng
d214ed0e75
Safely turn memset_chk etc. to non-chk variant if the known object size is >= memset / memcpy / memmove size.
...
llvm-svn: 97828
2010-03-05 20:59:47 +00:00
Evan Cheng
fffdad58ac
Instcombine should turn llvm.objectsize of a alloca with static size to an integer.
...
llvm-svn: 97827
2010-03-05 20:47:23 +00:00
Evan Cheng
27494232d4
Fix typo.
...
llvm-svn: 97818
2010-03-05 19:55:55 +00:00
Chris Lattner
f0692603d5
fix bss section printing for cell, patch by Kalle Raiskila!
...
llvm-svn: 97814
2010-03-05 18:55:36 +00:00
Chris Lattner
f6befffbb2
fix PR6512, a case where instcombine would incorrectly merge loads
...
from different addr spaces.
llvm-svn: 97813
2010-03-05 18:53:28 +00:00
Wesley Peck
34004170c5
Reworking the stack layout that the MicroBlaze backend generates.
...
The MicroBlaze backend was generating stack layouts that did not
conform correctly to the ABI. This update generates stack layouts
which are closer to what GCC does.
Variable arguments support was added as well but the stack layout
for varargs has not been finalized.
llvm-svn: 97807
2010-03-05 15:26:02 +00:00
Wesley Peck
b0578bf0c3
Adding MBlaze to cmake target list.
...
llvm-svn: 97806
2010-03-05 15:15:55 +00:00
Chris Lattner
067459c62b
Fix PR6503. This turned into a much more interesting and nasty bug. Various
...
parts of the cmp|cmp and cmp&cmp folding logic wasn't prepared for vectors
(unrelated to the bug but noticed while in the code) and the code was
*definitely* not safe to use by the (cast icmp)|(cast icmp) handling logic
that I added in r95855. Fix all this up by changing the various routines
to more consistently use IRBuilder and not pass in the I which had the wrong
type.
llvm-svn: 97801
2010-03-05 08:46:26 +00:00
Chris Lattner
fc13a0343c
make these less sensitive to temporary naming.
...
llvm-svn: 97799
2010-03-05 08:43:33 +00:00
Chris Lattner
48b6e27e7b
remove this testcase, it isn't clear what it was testing and it is subsumed by or.ll
...
llvm-svn: 97798
2010-03-05 08:43:06 +00:00
Evan Cheng
654ec2a663
Fix an oops in x86 sibcall optimization. If the ByVal callee argument is itself passed as a pointer, then it's obviously not safe to do a tail call.
...
llvm-svn: 97797
2010-03-05 08:38:04 +00:00
Duncan Sands
798ca1e6fe
If LD_LIBRARY_PATH is set in the system environment, use it.
...
llvm-svn: 97796
2010-03-05 08:21:02 +00:00
Chris Lattner
343d2e48b2
simplify some functions and make them work with vector
...
compares, noticed by inspection.
llvm-svn: 97795
2010-03-05 07:47:57 +00:00
Chris Lattner
c6c1523f59
fix a nice subtle reassociate bug which would only occur
...
in a very specific use pattern embodied in the carefully
reduced testcase.
llvm-svn: 97794
2010-03-05 07:18:54 +00:00
Eric Christopher
4899cbc77d
Move GetStringLength and helper from SimplifyLibCalls to ValueTracking.
...
No functionality change.
llvm-svn: 97793
2010-03-05 06:58:57 +00:00
Jeffrey Yasskin
5c92f933b3
Revert r97788 because it broke test/FrontendC/2010-02-16-DbgVarScope.c.
...
llvm-svn: 97792
2010-03-05 06:43:49 +00:00