Dale Johannesen
25a00a63eb
Add sqrt and powi intrinsics for long double.
...
llvm-svn: 42423
2007-09-28 01:08:20 +00:00
Dale Johannesen
1d1d0e7735
Don't do SRA for unions with long double fields.
...
Fixes a SWB crash.
llvm-svn: 42422
2007-09-28 00:21:38 +00:00
Owen Anderson
ee73e0b8cb
Convert DFSPass into a templated friend function, in preparation for making it common to DomTree and PostDomTree.
...
llvm-svn: 42420
2007-09-27 23:23:00 +00:00
Dan Gohman
a1d46c7d0a
TargetAsmInfo::getAddressSize() was incorrect for x86-64 and 64-bit targets
...
other than PPC64. Instead of fixing it, just remove it and fix all the
places that use it to use TargetData::getPointerSize() instead, as there
aren't very many. Most of the references were in DwarfWriter.cpp.
llvm-svn: 42419
2007-09-27 23:12:31 +00:00
Gordon Henriksen
613afce430
CollectorMetadata abstractly describes stack maps for a function.
...
It includes:
- location and of each safe point in machine code (identified by a
label)
- location of each root within the stack frame (identified by an
offset), including the metadata tag provided to llvm.gcroot in
the user program
- size of the stack frame (for collectors which want to cheat on
stack crawling :)
- and eventually will include liveness
It is to be populated by back-ends during code-generation.
CollectorModuleMetadata aggregates this information across the
entire module.
llvm-svn: 42418
2007-09-27 22:18:46 +00:00
Evan Cheng
99dc695da5
Use GR64 in 64-bit mode.
...
llvm-svn: 42417
2007-09-27 21:50:05 +00:00
Gordon Henriksen
658c57eb66
My previous Registry.h header, as well as Collectors.h, which is the
...
registry for dynamically-loaded garbage collection compiler plugins.
llvm-svn: 42415
2007-09-27 19:34:27 +00:00
Evan Cheng
5a71402be6
Doh. Calls clobber EFLAGS.
...
llvm-svn: 42413
2007-09-27 19:01:55 +00:00
Evan Cheng
e6f92253f5
Avoid inserting a live register more than once.
...
llvm-svn: 42410
2007-09-27 18:46:06 +00:00
Daniel Berlin
a447de7065
Ignore redundant constraints
...
llvm-svn: 42397
2007-09-27 15:42:23 +00:00
Nick Lewycky
3934961878
Build the correct range for loops with unusual bounds. Fix from Jay Foad.
...
llvm-svn: 42394
2007-09-27 14:12:54 +00:00
Evan Cheng
75439b3b78
Silence a compiler warning.
...
llvm-svn: 42389
2007-09-27 07:35:39 +00:00
Evan Cheng
bde499be60
Boogs.
...
llvm-svn: 42388
2007-09-27 07:29:27 +00:00
Evan Cheng
1ec79b41db
Be smarter about which node to force schedule. Reduce # of duplications + copies; Added statistics.
...
llvm-svn: 42387
2007-09-27 07:09:03 +00:00
Evan Cheng
cfd5f82890
Backtracking only when it won't create a cycle.
...
llvm-svn: 42384
2007-09-27 00:25:29 +00:00
Dale Johannesen
34aa41c475
Make temporaries explicit to avoid premature
...
destruction of compiler-created ones.
llvm-svn: 42383
2007-09-26 23:20:33 +00:00
Evan Cheng
8e136a9dc4
- Move getPhysicalRegisterRegClass() from ScheduleDAG to MRegisterInfo.
...
- Added ability to emit cross class register copies to the BBRU scheduler.
- More aggressive backtracking.
llvm-svn: 42375
2007-09-26 21:36:17 +00:00
Neil Booth
9acbf5aaf9
Whitespace and compiler warning cleanup.
...
llvm-svn: 42373
2007-09-26 21:33:42 +00:00
Evan Cheng
8728c3376a
- Added MRegisterInfo::getCrossCopyRegClass() hook. For register classes where reg to reg copies are not possible, this returns another register class which registers in the specified register class can be copied to (and copy back from).
...
- X86 copyRegToReg() now supports copying between EFLAGS and GR32 / GR64 registers.
llvm-svn: 42372
2007-09-26 21:31:07 +00:00
Evan Cheng
b93de587cb
Some assemblers do not recognize aliases pushfd, pushfq, popfd, and popfq. Just emit them as pushf and popf.
...
llvm-svn: 42371
2007-09-26 21:28:00 +00:00
Dale Johannesen
b6d56401aa
Enable codegen for long double abs, sin, cos
...
llvm-svn: 42368
2007-09-26 21:10:55 +00:00
Gordon Henriksen
c23b66c58b
Added C and Ocaml bindings for functions, basic blocks, and
...
instruction creation. No support yet for instruction introspection.
Also eliminated allocas from the Ocaml bindings for portability,
and avoided unnecessary casts.
llvm-svn: 42367
2007-09-26 20:56:12 +00:00
Dale Johannesen
f04d37d3a9
Fix f80 UNDEF.
...
llvm-svn: 42359
2007-09-26 17:26:49 +00:00
Evan Cheng
b4b352656a
Typos: POPQ -> POPFQ, POPD -> POPFD.
...
llvm-svn: 42348
2007-09-26 06:38:29 +00:00
Chris Lattner
c9e7b8ec50
move PR1160 here.
...
llvm-svn: 42347
2007-09-26 06:29:31 +00:00
Evan Cheng
c1e4e3743b
Allow copyRegToReg to emit cross register classes copies.
...
Tested with "make check"!
llvm-svn: 42346
2007-09-26 06:25:56 +00:00
Chris Lattner
fef69f5b4a
move PR1264 here.
...
llvm-svn: 42345
2007-09-26 06:15:48 +00:00
Evan Cheng
0a6f47cff9
Add pushf{d|q}, popf{d|q} to push and pop EFLAGS register.
...
llvm-svn: 42335
2007-09-26 01:29:06 +00:00
Evan Cheng
9b7f0e6eb4
translateX86CC updates the last two operands.
...
llvm-svn: 42333
2007-09-26 00:45:55 +00:00
Anton Korobeynikov
e291f727e3
Correctly restore stack pointer after realignment in main() on Cygwin/Mingw32
...
llvm-svn: 42332
2007-09-26 00:13:34 +00:00
Dale Johannesen
17663f40b9
Remove no-longer-used variable.
...
llvm-svn: 42329
2007-09-25 23:32:20 +00:00
Dale Johannesen
e7439eff5a
Make APFloat->int conversions deterministic even in
...
cases with undefined behavior.
llvm-svn: 42328
2007-09-25 23:07:07 +00:00
Evan Cheng
5321fa44f4
Missing load / store folding entries.
...
llvm-svn: 42323
2007-09-25 22:10:43 +00:00
Anton Korobeynikov
90910745bb
Partly revert invalid r41774
...
llvm-svn: 42322
2007-09-25 21:52:30 +00:00
Dan Gohman
57211c5550
More explicit keywords.
...
llvm-svn: 42316
2007-09-25 20:27:06 +00:00
Duncan Sands
384f4bd878
Add a newline to the end of this file.
...
llvm-svn: 42314
2007-09-25 20:08:48 +00:00
Dan Gohman
06919e8ef2
Fix a typo in a comment.
...
llvm-svn: 42313
2007-09-25 19:37:26 +00:00
Evan Cheng
8ee1ecfc50
New style x87 cmp instructions.
...
llvm-svn: 42312
2007-09-25 19:08:02 +00:00
Devang Patel
7bba386f72
Handle multiple induction variables.
...
This fixes PR714.
llvm-svn: 42309
2007-09-25 18:24:48 +00:00
Dan Gohman
31599685c7
When both x/y and x%y are needed (x and y both scalar integer), compute
...
both results with a single div or idiv instruction. This uses new X86ISD
nodes for DIV and IDIV which are introduced during the legalize phase
so that the SelectionDAG's CSE can automatically eliminate redundant
computations.
llvm-svn: 42308
2007-09-25 18:23:27 +00:00
Devang Patel
440d13b55b
Do not reserve DOM check for GetElementPtrInst.
...
llvm-svn: 42306
2007-09-25 17:55:50 +00:00
Devang Patel
5e1651d270
doh..
...
llvm-svn: 42300
2007-09-25 17:43:08 +00:00
Devang Patel
87d7e8ebcb
Add transformation to update loop interation space. Now,
...
for (i=A; i<N; i++) {
if (i < X && i > Y)
do_something();
}
is transformed into
U=min(N,X); L=max(A,Y);
for (i=L;i<U;i++)
do_somethihg();
llvm-svn: 42299
2007-09-25 17:31:19 +00:00
Dale Johannesen
4f55d9fe0f
Fix long double<->shorter FP type conversions
...
of zero, infinity, and NaNs.
llvm-svn: 42298
2007-09-25 17:25:00 +00:00
Dan Gohman
5e1a428344
Move the setOperationAction(ISD::DEBUG_LOC, MVT::Other, Expand) and
...
the check to see if the assembler supports .loc from X86TargetLowering
into the superclass TargetLowering.
llvm-svn: 42297
2007-09-25 15:10:49 +00:00
Duncan Sands
734b861299
Add missing end-of-file newlines.
...
llvm-svn: 42294
2007-09-25 07:10:01 +00:00
Evan Cheng
e95f391ef1
Added support for new condition code modeling scheme (i.e. physical register dependency). These are a bunch of instructions that are duplicated so the x86 backend can support both the old and new schemes at the same time. They will be deleted after
...
all the kinks are worked out.
llvm-svn: 42285
2007-09-25 01:57:46 +00:00
Evan Cheng
5924bf7d3b
Added major new capabilities to scheduler (only BURR for now) to support physical register dependency. The BURR scheduler can now backtrace and duplicate instructions in order to avoid "expensive / impossible to copy" values (e.g. status flag EFLAGS for x86) from being clobbered.
...
llvm-svn: 42284
2007-09-25 01:54:36 +00:00
Evan Cheng
8a7dec736d
New temporary option -new-cc-modeling-scheme to test the new cc modeling scheme.
...
llvm-svn: 42283
2007-09-25 01:50:04 +00:00
Evan Cheng
43686dad3d
Rename keyword "modify" -> "implicit".
...
llvm-svn: 42282
2007-09-25 01:48:59 +00:00
Dale Johannesen
0241bb57b2
When mixing SSE and x87 codegen, it's possible to
...
have situations where an SSE instruction turns into
multiple blocks, with the live range of an x87
register crossing them. To do this correctly make
sure we examine all blocks when inserting
FP_REG_KILL. PR 1697. (This was exposed by my
fix for PR 1681, but the same thing could happen
mixing x87 long double with SSE.)
llvm-svn: 42281
2007-09-24 22:52:39 +00:00
Bill Wendling
d40e795c19
Don't execute dump unless NDEBUG isn't defined.
...
llvm-svn: 42280
2007-09-24 22:43:48 +00:00
Daniel Berlin
c82c9f078a
Comment fixups
...
llvm-svn: 42279
2007-09-24 22:20:45 +00:00
Dan Gohman
1b2156fcae
Add support on x86 for having Legalize lower ISD::LOCATION to ISD::DEBUG_LOC
...
instead of ISD::LABEL with a manual .debug_line entry when the assembler
supports .file and .loc directives.
llvm-svn: 42278
2007-09-24 21:54:14 +00:00
Dan Gohman
3165699e4b
Don't emit .debug_line header data if there aren't any lines to put in it,
...
such as will happen when .loc directives are used.
llvm-svn: 42277
2007-09-24 21:43:52 +00:00
Dan Gohman
9b00c07be5
Move the Asm->EOL() call for EmitDebugARanges outside the #ifdef for
...
consistency with the other currently empty sections.
llvm-svn: 42276
2007-09-24 21:36:21 +00:00
Dan Gohman
0baf84b2e1
Add support for emitting .file directives to set up file numbers for
...
use with .loc directives.
llvm-svn: 42275
2007-09-24 21:32:18 +00:00
Dan Gohman
0cc9d1b93b
Merge hasDotLoc and hasDotFile into hasDotLocAndDotFile since .loc and .file
...
aren't really usable without each other.
llvm-svn: 42274
2007-09-24 21:09:53 +00:00
Dale Johannesen
5026f4ba93
float->int conversion rounds toward 0. Duh.
...
Fixes PR1698.
llvm-svn: 42273
2007-09-24 21:06:09 +00:00
Dan Gohman
bd8331da87
Add a routine for emitting .file directives, for setting up
...
file numbers to use with .loc directives.
llvm-svn: 42272
2007-09-24 20:58:13 +00:00
Bruno Cardoso Lopes
6d5ada23db
Added "LoadEffective" pattern to handle stack locations.
...
Fixed some comments
llvm-svn: 42271
2007-09-24 20:15:11 +00:00
Devang Patel
9e30e1a3be
Do not promote null values because it may be unsafe to do so.
...
llvm-svn: 42270
2007-09-24 20:02:42 +00:00
Daniel Berlin
5d7136a1df
Implement offline variable substitution in order to reduce memory
...
and time usage.
Fixup operator == to make this work, and add a resize method to DenseMap
so we can resize our hashtable once we know how big it should be.
llvm-svn: 42269
2007-09-24 19:45:49 +00:00
Dan Gohman
071efe28bb
Fix the syntax for the .loc directive in preparation for using it.
...
llvm-svn: 42268
2007-09-24 19:25:06 +00:00
Dan Gohman
82dcfd2dab
The code that used the StartLabelId label was removed, so remove the
...
code that creates the label too.
llvm-svn: 42265
2007-09-24 16:44:26 +00:00
Dan Gohman
6002818999
Use the correct result value type instead of using getValueType(0)
...
in ExpandEXTRACT_VECTOR_ELT and SplitVectorOp. This fixes an abort
in the included testcase.
llvm-svn: 42264
2007-09-24 15:54:53 +00:00
Dan Gohman
75470c3bf1
explicit keywords.
...
llvm-svn: 42262
2007-09-24 15:48:49 +00:00
Chris Lattner
5b5484db63
claim that "st" is from the 80-bit register file. This causes x87-using inline
...
asm to die with:
ScheduleDAG.cpp:269: failed assertion `false && "Couldn't find the register class"'
instead of:
failed assertion `RegMap->getRegClass(VReg) == RC && "Register class of operand and regclass of use don't agree!"'
yay.
llvm-svn: 42259
2007-09-24 05:27:37 +00:00
Chris Lattner
7d98b23f1a
When emitting .set directives, make sure the EH and Debug labels can't conflict.
...
llvm-svn: 42257
2007-09-24 03:35:37 +00:00
Owen Anderson
4f7c390939
Merge significant portions of the DomTree and PostDomTree implementations.
...
The two remaining unmerged parts are DFSPass, and the Calculate().
llvm-svn: 42255
2007-09-24 02:29:29 +00:00
Dale Johannesen
acbb26f125
Just use APFloat for const / const. Fixes
...
-1. / -0.
llvm-svn: 42254
2007-09-24 00:32:45 +00:00
Owen Anderson
15efb43db7
Factor the calculation details for PostDomTree out of PostDominators.cpp and
...
into a separate header file.
Next step: merging PostDominatorCalculation.h with DominatorCalculation.h.
llvm-svn: 42251
2007-09-23 22:21:00 +00:00
Owen Anderson
da853a400f
Move DFSPass back down into DominatorTree. I need to figure out what the difference is between it
...
and the PostDomTree version first.
llvm-svn: 42250
2007-09-23 22:16:38 +00:00
Owen Anderson
7888658c5f
Fix header.
...
llvm-svn: 42249
2007-09-23 21:32:55 +00:00
Owen Anderson
84c357fc26
Factor the dominator tree calculation details out into DominatorCalculation.h. This
...
change is not useful in and of itself, but it lays the groundwork for combining
the dominator and postdominator implementations.
Also, factor a few methods that are common to DominatorTree and PostDominatorTree
into DominatorTreeBase. Again, this will make merging the two calculation methods
simpler in the future.
llvm-svn: 42248
2007-09-23 21:31:44 +00:00
Dale Johannesen
e36c400255
Fix PR 1681. When X86 target uses +sse -sse2,
...
keep f32 in SSE registers and f64 in x87. This
is effectively a new codegen mode.
Change addLegalFPImmediate to permit float and
double variants to do different things.
Adjust callers.
llvm-svn: 42246
2007-09-23 14:52:20 +00:00
Chris Lattner
e48195e0f3
Fix PR1679, by printing GEP indices as signed values instead of unsigned.
...
llvm-svn: 42239
2007-09-22 20:16:48 +00:00
Chris Lattner
10671ad650
initialize isstore/isload fields in ctor, fixing PR1695
...
llvm-svn: 42222
2007-09-22 07:02:12 +00:00
Neil Booth
a8d7269269
Handle storage complications of float->float conversions.
...
llvm-svn: 42220
2007-09-22 02:56:19 +00:00
Dale Johannesen
4230512f32
Change APFloat::convertFromInteger to take the incoming
...
bit width instead of number of words allocated, which
makes it actually work for int->APF conversions.
Adjust callers. Add const to one of the APInt constructors
to prevent surprising match when called with const
argument.
llvm-svn: 42210
2007-09-21 22:09:37 +00:00
Devang Patel
361e52f39c
Fix PR1692
...
llvm-svn: 42209
2007-09-21 21:18:19 +00:00
Chris Lattner
87ce0bec91
#ifdef out unsafe tracing code, which fixes PR1689
...
llvm-svn: 42205
2007-09-21 18:30:39 +00:00
Chris Lattner
51ce795c92
don't read Block after it is freed. This fixes PR1684
...
llvm-svn: 42204
2007-09-21 18:25:53 +00:00
Chris Lattner
b3d01d2f56
initialize SetCCResultContents, fixing PR1693
...
llvm-svn: 42193
2007-09-21 17:06:39 +00:00
Rafael Espindola
4730c04904
Don't add a default STACK_ALIGN (use the generic ABI alignment)
...
Implement calls to functions with byval arguments on X86
llvm-svn: 42192
2007-09-21 15:50:22 +00:00
Rafael Espindola
f065f0e2a1
small cleanup: use LowerMemArgument in LowerFastCCArguments also
...
llvm-svn: 42189
2007-09-21 14:55:38 +00:00
Owen Anderson
46da2a6262
Add partial caching of non-local memory dependence queries. This provides a modest
...
speedup for GVN.
llvm-svn: 42185
2007-09-21 03:53:52 +00:00
Evan Cheng
1ff71872c2
Honor user-defined section specification of a global, ignores whether its initializer is null.
...
llvm-svn: 42182
2007-09-21 00:41:19 +00:00
Dale Johannesen
146a0ea071
Fix PR 1688. See comments there.
...
llvm-svn: 42181
2007-09-20 23:47:58 +00:00
Devang Patel
83cc3f8f51
Update aux. info associated with an instruction before erasing instruction.
...
llvm-svn: 42180
2007-09-20 23:45:50 +00:00
Devang Patel
d29f938335
Do not override user specified section.
...
llvm-svn: 42179
2007-09-20 23:07:37 +00:00
Devang Patel
6117a3b696
Don't increment invalid iterator.
...
llvm-svn: 42178
2007-09-20 23:01:50 +00:00
Dale Johannesen
cc7c475705
Fix dumb regression in constant folding (Regression/C/casts)
...
llvm-svn: 42165
2007-09-20 16:50:21 +00:00
Dan Gohman
4dbc582a36
Fix several more entries in the x86 reload/remat folding tables.
...
llvm-svn: 42162
2007-09-20 14:17:21 +00:00
Dale Johannesen
95be037d67
another long double buglet
...
llvm-svn: 42159
2007-09-20 01:27:54 +00:00
Nick Lewycky
eae7e7d00b
Fix optimization. %x = sub %x, %y does not imply that %y is zero.
...
llvm-svn: 42157
2007-09-20 00:48:36 +00:00
Evan Cheng
8010320365
Enable if-conversion for ARM by default.
...
llvm-svn: 42156
2007-09-20 00:48:22 +00:00
Dale Johannesen
7d67e547b5
More long double fixes. x86_64 should build now.
...
llvm-svn: 42155
2007-09-19 23:55:34 +00:00
Evan Cheng
d0e360e16e
Avoid referencing deleted instruction.
...
llvm-svn: 42153
2007-09-19 21:48:07 +00:00
Devang Patel
464276f831
Avoid unsafe promotion.
...
llvm-svn: 42149
2007-09-19 20:18:51 +00:00