Bill Wendling
c4a53b617f
Another missed optimization with LICM.
...
llvm-svn: 42552
2007-10-02 21:43:06 +00:00
Bill Wendling
36f033e53e
Small label changes.
...
llvm-svn: 42549
2007-10-02 21:02:53 +00:00
Bill Wendling
a7d5c36215
Now with source code.
...
llvm-svn: 42548
2007-10-02 21:01:16 +00:00
Bill Wendling
0159f0c5ba
Now with LL code!
...
llvm-svn: 42547
2007-10-02 20:54:32 +00:00
Bill Wendling
48c27bf598
Another missed optimization.
...
llvm-svn: 42546
2007-10-02 20:42:59 +00:00
Bill Wendling
5e50716a6b
Micro-optimization -- missed LICM opportunity.
...
llvm-svn: 42542
2007-10-02 19:55:05 +00:00
Dale Johannesen
a4e3643cb3
Rewrite sqrt and powi to use anyfloat. By popular demand.
...
llvm-svn: 42537
2007-10-02 17:43:59 +00:00
Evan Cheng
3537dbbd1e
Refactor code to add load / store folded instructions -> register only
...
instructions reverse map.
llvm-svn: 42509
2007-10-01 23:44:33 +00:00
Dale Johannesen
d94f00234f
Fix stride computations for long double arrays.
...
llvm-svn: 42508
2007-10-01 23:08:35 +00:00
Dan Gohman
d3dfb76a43
Move the code that emits the .file directives so that it runs after the
...
SourceFiles list is fully filled in so that it sees all of the files.
llvm-svn: 42506
2007-10-01 22:40:20 +00:00
Evan Cheng
d1a77589e9
Remove simple scheduler.
...
llvm-svn: 42499
2007-10-01 20:44:07 +00:00
Devang Patel
42f006a51a
Relax unsafe use check. If there is one unconditional use inside the loop then it is safe to promote value even if there is another conditional use inside the loop.
...
llvm-svn: 42493
2007-10-01 18:12:58 +00:00
Evan Cheng
c863779cd4
Typo. X86comi doesn't read / write chain's.
...
llvm-svn: 42492
2007-10-01 18:12:48 +00:00
Dale Johannesen
ef488c7b0e
Add getABITypeSize, getABITypeSizeInBits
...
llvm-svn: 42488
2007-10-01 16:03:14 +00:00
Dale Johannesen
aa97ad6250
remove dup comment
...
llvm-svn: 42486
2007-09-30 19:08:12 +00:00
Dale Johannesen
2a0b2ab2fc
Constant fold int-to-long-double conversions;
...
use APFloat for int-to-float/double; use
round-to-nearest for these (implementation-defined,
seems to match gcc).
llvm-svn: 42484
2007-09-30 18:19:03 +00:00
Dale Johannesen
4b203b8e44
Simplify and fix signed int -> FP conversions.
...
llvm-svn: 42483
2007-09-30 18:17:01 +00:00
Gordon Henriksen
9b5a117d01
AsmPrinters overriding getAnalysisUsage should call super.
...
And not super's super, either.
llvm-svn: 42482
2007-09-30 13:39:29 +00:00
Owen Anderson
09ba812a80
Template-ize more of the DomTree internal implementation details. Only the calculate() methods for DomTree and PostDomTree remain to be merged/template-ized.
...
llvm-svn: 42476
2007-09-30 04:17:16 +00:00
Chris Lattner
1654385fd0
Add a new DenseSet abstraction.
...
llvm-svn: 42474
2007-09-30 00:47:20 +00:00
Duncan Sands
5e73fe090a
Check that the second parameter of init_trampoline
...
can be resolved to a function. This is required
for codegen and used by instcombine.
llvm-svn: 42469
2007-09-29 16:25:54 +00:00
Gordon Henriksen
822397fb31
This is done already.
...
llvm-svn: 42467
2007-09-29 02:23:08 +00:00
Gordon Henriksen
2b019da6b0
Collector is the base class for garbage collection code generators.
...
This version enhances the previous patch to add root initialization
as discussed here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070910/053455.html
Collector gives its subclasses control over generic algorithms:
unsigned NeededSafePoints; //< Bitmask of required safe points.
bool CustomReadBarriers; //< Default is to insert loads.
bool CustomWriteBarriers; //< Default is to insert stores.
bool CustomRoots; //< Default is to pass through to backend.
bool InitRoots; //< If set, roots are nulled during lowering.
It also has callbacks which collectors can hook:
/// If any of the actions are set to Custom, this is expected to
/// be overriden to create a transform to lower those actions to
/// LLVM IR.
virtual Pass *createCustomLoweringPass() const;
/// beginAssembly/finishAssembly - Emit module metadata as
/// assembly code.
virtual void beginAssembly(Module &M, std::ostream &OS,
AsmPrinter &AP,
const TargetAsmInfo &TAI) const;
virtual void finishAssembly(Module &M,
CollectorModuleMetadata &CMM,
std::ostream &OS, AsmPrinter &AP,
const TargetAsmInfo &TAI) const;
Various other independent algorithms could be implemented, but were
not necessary for the initial two collectors. Some examples are
listed here:
http://llvm.org/docs/GarbageCollection.html#collector-algos
llvm-svn: 42466
2007-09-29 02:13:43 +00:00
Gordon Henriksen
b3d98e2023
Demoting CHelpers.h to include/llvm/Support.
...
llvm-svn: 42465
2007-09-29 01:38:42 +00:00
Daniel Berlin
90642519e9
Switch to densemap rather than std::set
...
llvm-svn: 42462
2007-09-29 00:50:40 +00:00
Evan Cheng
f3c130a8b6
Enabling new condition code modeling scheme.
...
llvm-svn: 42459
2007-09-29 00:00:36 +00:00
Dan Gohman
02f80006f8
Teach SplitVectorOp how to split INSERT_VECTOR_ELT.
...
llvm-svn: 42457
2007-09-28 23:53:40 +00:00
Evan Cheng
1a48cdc61e
If two instructions are both two-address code, favors (schedule closer to
...
terminator) the one that has a CopyToReg use. This fixes
2006-05-11-InstrSched.ll with -new-cc-modeling-scheme.
llvm-svn: 42453
2007-09-28 22:32:30 +00:00
Chris Lattner
920bede750
really fix PR1581, thanks to Daniel Dunbar for pointing
...
this out.
llvm-svn: 42448
2007-09-28 20:50:50 +00:00
Chris Lattner
14442c9a4d
Make Value::getNameLen not crash on an empty name, fixing PR1712.
...
llvm-svn: 42444
2007-09-28 20:09:40 +00:00
Evan Cheng
2fca1e4f84
Remove a poor scheduling heuristic.
...
llvm-svn: 42443
2007-09-28 19:37:35 +00:00
Evan Cheng
71904c241e
Trim some unneeded fields.
...
llvm-svn: 42442
2007-09-28 19:24:24 +00:00
Dale Johannesen
8660e0ed82
Fix long double -> uint64 conversion.
...
llvm-svn: 42440
2007-09-28 18:44:17 +00:00
Dale Johannesen
a30678c8f0
minor long double related changes
...
llvm-svn: 42439
2007-09-28 18:06:58 +00:00
Dan Gohman
cf40e00d32
Make the checks for DW_FORM_data4 consistent with the others, and
...
add more such code for DIEDwarfLabel::SizeOf and DIEObjectLabel::SizeOf.
llvm-svn: 42435
2007-09-28 16:50:28 +00:00
Dan Gohman
8e1513ad66
Use 32-bit data directives for DW_FORM_data4 format data, even on
...
targets with 64-bit addresses.
llvm-svn: 42434
2007-09-28 15:43:33 +00:00
Rafael Espindola
01b306e575
Refactor the memcpy lowering for the x86 target.
...
The only generated code difference is that now we call memcpy when
the size of the array is unknown. This matches GCC behavior and is
better since the run time value can be arbitrarily large.
llvm-svn: 42433
2007-09-28 12:53:01 +00:00
Evan Cheng
c2acb6f2e5
Stop inventing new words. :-)
...
llvm-svn: 42429
2007-09-28 01:35:02 +00:00
Owen Anderson
bc2f1ab49d
Remove unneeded #include.
...
llvm-svn: 42428
2007-09-28 01:25:07 +00:00
Owen Anderson
a533c458f5
Have PostDomTree use the newly templated DFSPass.
...
llvm-svn: 42427
2007-09-28 01:23:47 +00:00
Evan Cheng
d3ff9d3ff7
Pessimisively assume ADJCALLSTACKDOWN / ADJCALLSTACKUP (which becomes sub / add) clobbers EFLAGS.
...
llvm-svn: 42426
2007-09-28 01:19:48 +00:00
Dale Johannesen
e61886cee4
Add sqrt and powi intrinsics for long double.
...
llvm-svn: 42423
2007-09-28 01:08:20 +00:00
Dale Johannesen
412575891e
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
e529f66979
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
50747737a5
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
b20ff7f981
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
d8ab90ae1f
Use GR64 in 64-bit mode.
...
llvm-svn: 42417
2007-09-27 21:50:05 +00:00
Gordon Henriksen
2571db23f1
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
826f0f94df
Doh. Calls clobber EFLAGS.
...
llvm-svn: 42413
2007-09-27 19:01:55 +00:00
Evan Cheng
02e1749295
Avoid inserting a live register more than once.
...
llvm-svn: 42410
2007-09-27 18:46:06 +00:00