Chris Lattner
8f3afbc621
Emulate the current isel's "IsChainCompatible" logic for now.
...
I'd like to eventually rip it out, but for now producing the
same selections as the old matcher is more important.
llvm-svn: 96458
2010-02-17 06:23:39 +00:00
Chris Lattner
abb5e906a7
simplify IsChainCompatible codegen, add comments. no
...
functionality change.
llvm-svn: 96453
2010-02-17 05:35:28 +00:00
Chris Lattner
9625fb062a
make the new isel's interpreter loop call the generated
...
CheckComplexPattern function. Though it is logically const,
I don't have the fortitude to clean up all the targets now,
and it not being const doesn't block anything.
llvm-svn: 96426
2010-02-17 00:41:34 +00:00
Devang Patel
bebe8e55dc
Use line and column number to distinguish two lexical blocks at the same level.
...
llvm-svn: 96395
2010-02-16 21:39:34 +00:00
Bob Wilson
86dded571f
Rename SuccessorNumber to GetSuccessorNumber.
...
llvm-svn: 96387
2010-02-16 21:06:42 +00:00
Bob Wilson
a866c660db
Split critical edges as needed for load PRE.
...
llvm-svn: 96378
2010-02-16 19:51:59 +00:00
Bob Wilson
1115365fcf
Refactor to share code to find the position of a basic block successor in the
...
terminator's list of successors.
llvm-svn: 96377
2010-02-16 19:49:17 +00:00
Chris Lattner
ebcd505b14
convert the new matcher to check intermediate nodes for a single
...
use and only call IsProfitableToFold/IsLegalToFold on the load
being folded, like the old dagiselemitter does. This
substantially simplifies the code and improves opportunities for
sharing.
llvm-svn: 96368
2010-02-16 19:15:55 +00:00
Duncan Sands
e9a13a3c60
Introduce isOpaqueTy and use it rather than isa<OpaqueType>. Also, move some
...
methods to try to have the type predicates be more logically positioned.
llvm-svn: 96349
2010-02-16 14:50:09 +00:00
Duncan Sands
1b33dd3c83
There are two ways of checking for a given type, for example isa<PointerType>(T)
...
and T->isPointerTy(). Convert most instances of the first form to the second form.
Requested by Chris.
llvm-svn: 96344
2010-02-16 11:11:14 +00:00
Chris Lattner
a9550b6d27
generate code for node and pattern predicates. Note that this won't
...
build if enabled, it will fail with constness issues. I'll resolve
these next.
llvm-svn: 96336
2010-02-16 07:21:10 +00:00
Chris Lattner
104828612b
add support for the new isel matcher to generate
...
(isprofitable|islegal)tofold checks.
llvm-svn: 96331
2010-02-16 06:10:58 +00:00
Erick Tryzelaar
f4ca539af4
Fix a typo in an LLVMOpcode enum. LLVMTrunk -> LLVMTrunc.
...
llvm-svn: 96324
2010-02-16 03:45:23 +00:00
Anton Korobeynikov
ef1862e256
Move TLOF implementations to libCodegen to resolve layering violation.
...
llvm-svn: 96288
2010-02-15 22:37:53 +00:00
Anton Korobeynikov
dccd240998
Preliminary patch to improve dwarf EH generation - Hooks to return Personality / FDE / LSDA / TType encoding depending on target / options (e.g. code model / relocation model) - MCIzation of Dwarf EH printer to use encoding information - Stub generation for ELF target (needed for indirect references) - Some other small changes here and there
...
llvm-svn: 96285
2010-02-15 22:35:59 +00:00
Bill Wendling
bbf95aae9f
Remove c++ style comments from c header.
...
llvm-svn: 96266
2010-02-15 20:53:17 +00:00
Bill Wendling
8ed10ca345
Renumber Instruction enums in llvm-c.
...
llvm-svn: 96264
2010-02-15 20:50:51 +00:00
Evan Cheng
b5fe25544c
Split SelectionDAGISel::IsLegalAndProfitableToFold to
...
IsLegalToFold and IsProfitableToFold. The generic version of the later simply checks whether the folding candidate has a single use.
This allows the target isel routines more flexibility in deciding whether folding makes sense. The specific case we are interested in is folding constant pool loads with multiple uses.
llvm-svn: 96255
2010-02-15 19:41:07 +00:00
Chris Lattner
ab9dc2e37b
comment fix.
...
llvm-svn: 96248
2010-02-15 18:55:04 +00:00
David Greene
4f983d569c
Add non-temporal flags and remove an assumption of default arguments.
...
llvm-svn: 96240
2010-02-15 17:00:31 +00:00
David Greene
0ed0396052
Add non-temporal flags to MachineMemOperand.
...
llvm-svn: 96226
2010-02-15 16:48:31 +00:00
Duncan Sands
2acaf3609c
Uniformize the names of type predicates: rather than having isFloatTy and
...
isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris!
llvm-svn: 96223
2010-02-15 16:12:20 +00:00
Chris Lattner
bc3bc62709
Check in the first big step of rewriting DAGISelEmitter to
...
produce a table based matcher instead of gobs of C++ Code.
Though it's not done yet, the shrinkage seems promising,
the table for the X86 ISel is 75K and still has a lot of
optimization to come (compare to the ~1.5M of .o generated
the old way, much of which will go away).
The code is currently disabled by default (the #if 0 in
DAGISelEmitter.cpp). When enabled it generates a dead
SelectCode2 function in the DAGISel Header which will
eventually replace SelectCode.
There is still a lot of stuff left to do, which are
documented with a trail of FIXMEs.
llvm-svn: 96215
2010-02-15 08:04:42 +00:00
Chris Lattner
8e8498ea02
give SDValue an operator->, allowing V->isTargetOpcode() and
...
many other natural things.
llvm-svn: 96214
2010-02-15 07:11:34 +00:00
Chris Lattner
2b00dd86ae
don't make insanely large node numbers for no reason,
...
packing somewhat densely is better than not.
llvm-svn: 96213
2010-02-15 06:39:31 +00:00
Chris Lattner
eeadc240f2
make PadToColumn return the stream so you can use:
...
OS.PadToColumn(42) << "foo";
llvm-svn: 96208
2010-02-15 02:17:50 +00:00
Dan Gohman
6c0fdcea5e
When restoring a saved insert location, check to see if the saved
...
insert location has become an "inserted" instruction since the time
it was saved. If so, advance to the first non-"inserted" instruction.
llvm-svn: 96203
2010-02-15 00:21:43 +00:00
Dan Gohman
4d5f3b74e4
In rememberInstruction, if the value being remembered is the
...
current insertion point, advance the current insertion point.
This avoids a use-before-def situation in a testcase extracted
from clang which is difficult to reduce to a reasonable-sized
regression test.
llvm-svn: 96151
2010-02-14 03:12:47 +00:00
Dan Gohman
8985140f3e
Remove a 'protected' keyword, now that SCEVExpander is no longer
...
intended to be subclassed.
llvm-svn: 96149
2010-02-14 02:47:26 +00:00
Daniel Dunbar
7a1fd21459
MCAssembler: Switch MCAsmFixup to storing MCFixupKind instead of just a size.
...
llvm-svn: 96094
2010-02-13 09:28:54 +00:00
Daniel Dunbar
8e9044353a
MCAssembler: Sink fixup list into MCDataFragment.
...
llvm-svn: 96093
2010-02-13 09:28:43 +00:00
Daniel Dunbar
95ae012b0e
MCAssembler: Switch MCFillFragment to only taking constant values. Symbolic expressions can always be emitted as data + fixups.
...
llvm-svn: 96092
2010-02-13 09:28:32 +00:00
Daniel Dunbar
481e926468
MCAssembler: Start applying fixups in the data section.
...
llvm-svn: 96090
2010-02-13 09:28:15 +00:00
Daniel Dunbar
a699e834fb
MCAssembler: Add assorted dump() methods.
...
llvm-svn: 96089
2010-02-13 09:28:03 +00:00
Evan Cheng
6eb7ff5bbf
Teach MachineFrameInfo to track maximum alignment while stack objects are being
...
created. This ensures it's updated at all time. It means targets which perform
dynamic stack alignment would know whether it is required and whether frame
pointer register cannot be made available register allocation.
This is a fix for rdar://7625239. Sorry, I can't create a reasonably sized test
case.
llvm-svn: 96069
2010-02-13 01:56:41 +00:00
Dan Gohman
1e93b1c022
Override dominates and properlyDominates for SCEVAddRecExpr, as a
...
SCEVAddRecExpr doesn't necessarily dominate blocks merely dominated
by all of its operands. This fixes an abort compiling 403.gcc.
llvm-svn: 96056
2010-02-13 00:19:39 +00:00
Chris Lattner
946403d05f
give MCCodeEmitters access to the current MCContext.
...
llvm-svn: 96038
2010-02-12 23:12:47 +00:00
Bob Wilson
881d06c0b9
Fix a comment typo.
...
llvm-svn: 96027
2010-02-12 22:34:54 +00:00
Chris Lattner
2a0d9140f5
doxygenize some comments, patch by Peter Collingbourne!
...
llvm-svn: 96018
2010-02-12 21:54:28 +00:00
Chris Lattner
2265d6280b
Add support for a union type in LLVM IR. Patch by Talin!
...
llvm-svn: 96011
2010-02-12 20:49:41 +00:00
Anton Korobeynikov
7073515c86
Cleanup stdcall / fastcall name mangling.
...
This should fix alot of problems we saw so far, e.g. PRs 5851 & 2936
llvm-svn: 95980
2010-02-12 15:28:40 +00:00
Dan Gohman
c40eb525ad
Reapply the new LoopStrengthReduction code, with compile time and
...
bug fixes, and with improved heuristics for analyzing foreign-loop
addrecs.
This change also flattens IVUsers, eliminating the stride-oriented
groupings, which makes it easier to work with.
llvm-svn: 95975
2010-02-12 10:34:29 +00:00
Bob Wilson
2fd80c3d94
Add a new pass on machine instructions to optimize away PHI cycles that
...
reduce down to a single value. InstCombine already does this transformation
but DAG legalization may introduce new opportunities. This has turned out to
be important for ARM where 64-bit values are split up during type legalization:
InstCombine is not able to remove the PHI cycles on the 64-bit values but
the separate 32-bit values can be optimized. I measured the compile time
impact of this (running llc on 176.gcc) and it was not significant.
llvm-svn: 95951
2010-02-12 01:30:21 +00:00
Charles Davis
d69c12ecc6
Add a new function attribute, 'alignstack'. It will indicate (when the backends
...
implement support for it) that the stack should be forcibly realigned in the
prologue (and the process reversed in the epilogue).
llvm-svn: 95945
2010-02-12 00:31:15 +00:00
Chris Lattner
144a1b7a24
add a new MCInstPrinter::getOpcodeName interface, when it is
...
implemented, llvm-mc --show-inst now uses it to print the
instruction opcode as well as the number.
llvm-svn: 95929
2010-02-11 22:39:10 +00:00
Daniel Dunbar
3ee9e4a9a5
MC: Move assembler-backend's fixup list into the fragment.
...
llvm-svn: 95926
2010-02-11 21:29:46 +00:00
Daniel Dunbar
fa324dd09b
MC: Move MCSectionData::Fixup out to MCAsmFixup.
...
llvm-svn: 95925
2010-02-11 21:29:29 +00:00
Chris Lattner
b82b965968
make getFixupKindInfo return a const reference, allowing
...
the tables to be const. Teach MCCodeEmitter to handle
the target-indep kinds so that we don't crash on them.
llvm-svn: 95924
2010-02-11 21:27:18 +00:00
Chris Lattner
63870006bf
refactor x86 conditional branches to use a multipattern
...
that generates the 1-byte and 4-byte immediate versions
from one definition.
llvm-svn: 95902
2010-02-11 19:31:22 +00:00
Jeffrey Yasskin
ad23983452
Fix some of the memcheck errors found in the JIT unittests.
...
llvm-svn: 95856
2010-02-11 06:41:30 +00:00