Commit Graph

20238 Commits

Author SHA1 Message Date
Evan Cheng 991cf47221 Oops. Didn't mean to leave this in.
llvm-svn: 42626
2007-10-05 01:39:40 +00:00
Evan Cheng 79e9713b11 If a node that defines a physical register that is expensive to copy. The
scheduler will try a number of tricks in order to avoid generating the
copies. This may not be possible in case the node produces a chain value
that prevent movement. Try unfolding the load from the node before to allow
it to be moved / cloned.

llvm-svn: 42625
2007-10-05 01:39:18 +00:00
Evan Cheng a851e2b92e Added storeRegToAddr, loadRegFromAddr, and unfoldMemoryOperand's.
llvm-svn: 42624
2007-10-05 01:34:55 +00:00
Evan Cheng 6912b50958 Not needed any more.
llvm-svn: 42623
2007-10-05 01:34:14 +00:00
Evan Cheng 1ef9edce5f Forgot these.
llvm-svn: 42622
2007-10-05 01:33:45 +00:00
Evan Cheng f4cf5dcdd2 - Added a few target hooks to generate load / store instructions from / to any
address (not just from / to frameindexes).
- Added target hooks to unfold load / store instructions / SDNodes into separate
load, data processing, store instructions / SDNodes.

llvm-svn: 42621
2007-10-05 01:32:41 +00:00
Evan Cheng 4852303bdb Add a variant of getTargetNode() that takes a vector of MVT::ValueType.
llvm-svn: 42620
2007-10-05 01:10:49 +00:00
Evan Cheng fd11ef4665 Silence a warning.
llvm-svn: 42619
2007-10-05 01:09:32 +00:00
Chris Lattner 1f2b5f0e13 add a note.
llvm-svn: 42607
2007-10-04 15:47:27 +00:00
Neil Booth 8f1946fa22 Add APFloat -> hexadecimal string conversion, as per %a and %A in C99.
Useful for diagnostics and debugging.

llvm-svn: 42598
2007-10-03 22:26:02 +00:00
Owen Anderson 8313e75ea7 Completely merge the implementation details of DomTree and PostDomTree.
Also, add a FIXME for a bug in PostDomTree calculation I noticed while writing this,

llvm-svn: 42593
2007-10-03 21:25:45 +00:00
Devang Patel 3574759d85 Fix 80 col violation.
llvm-svn: 42591
2007-10-03 21:17:43 +00:00
Devang Patel e192e32577 Refactor code in a separate method.
llvm-svn: 42590
2007-10-03 21:16:08 +00:00
Chris Lattner 99f6ab7e4c Add initial iterator support for folding set.
llvm-svn: 42589
2007-10-03 21:12:09 +00:00
Chris Lattner 8c41ed61d1 Simplify implementation of the FoldingSet circular list, a necessary step
to giving it iterators.

llvm-svn: 42586
2007-10-03 20:45:43 +00:00
Dan Gohman c731c97fac Use empty() member functions when that's what's being tested for instead
of comparing begin() and end().

llvm-svn: 42585
2007-10-03 19:26:29 +00:00
Dan Gohman 8c43e41d9b Fix a using namespace llvm; in a header file.
llvm-svn: 42584
2007-10-03 19:04:09 +00:00
Dale Johannesen 9d559cfff5 Tone down an overzealous optimization.
llvm-svn: 42582
2007-10-03 17:45:27 +00:00
Chris Lattner 4bdb84fe53 add a note
llvm-svn: 42579
2007-10-03 17:10:03 +00:00
Tanya Lattner 30f65fe4a7 Fix PR1719, by not marking llvm.global.annotations internal.
llvm-svn: 42578
2007-10-03 17:05:40 +00:00
Neil Booth 1ca1f80b38 Tweak RoundAwayFromZero the bit number below which is truncated, and make
it const.

Preparation for APFloat -> hexadecimal string conversion.

llvm-svn: 42576
2007-10-03 15:16:41 +00:00
Chris Lattner 4d4e9cdb62 add a note
llvm-svn: 42573
2007-10-03 06:10:59 +00:00
Chris Lattner d66e0cd6c0 Fix PR1719, by not marking llvm.noinline internal.
llvm-svn: 42565
2007-10-03 03:59:15 +00:00
Chris Lattner 21ba176c4b Bill's example is still not enough to repro this, but it has other issues that
seem significant as well.

llvm-svn: 42564
2007-10-03 03:40:24 +00:00
Owen Anderson b60f254975 Factor some code from the DomTree and PostDomTree calculate methods up into
each one's runOnFunction method.

llvm-svn: 42563
2007-10-03 03:20:17 +00:00
Bill Wendling 3efc0758ae Another micro-opt.
llvm-svn: 42554
2007-10-02 21:49:31 +00:00
Bill Wendling f214ff8701 Another missed optimization with LICM.
llvm-svn: 42552
2007-10-02 21:43:06 +00:00
Bill Wendling 855011e5c6 Small label changes.
llvm-svn: 42549
2007-10-02 21:02:53 +00:00
Bill Wendling 4eb7ca4b4c Now with source code.
llvm-svn: 42548
2007-10-02 21:01:16 +00:00
Bill Wendling 96ed3bb2d4 Now with LL code!
llvm-svn: 42547
2007-10-02 20:54:32 +00:00
Bill Wendling 9c4d61b523 Another missed optimization.
llvm-svn: 42546
2007-10-02 20:42:59 +00:00
Bill Wendling 88ea107fdb Micro-optimization -- missed LICM opportunity.
llvm-svn: 42542
2007-10-02 19:55:05 +00:00
Dale Johannesen 4d4e77af8e Rewrite sqrt and powi to use anyfloat. By popular demand.
llvm-svn: 42537
2007-10-02 17:43:59 +00:00
Evan Cheng 1f79ba6fe6 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 b6c05b1f90 Fix stride computations for long double arrays.
llvm-svn: 42508
2007-10-01 23:08:35 +00:00
Dan Gohman 9765cc3bbb 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 a3a67596f6 Remove simple scheduler.
llvm-svn: 42499
2007-10-01 20:44:07 +00:00
Devang Patel 2a60ff1aeb 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 a1b7e95039 Typo. X86comi doesn't read / write chain's.
llvm-svn: 42492
2007-10-01 18:12:48 +00:00
Dale Johannesen 28e19a48ce Add getABITypeSize, getABITypeSizeInBits
llvm-svn: 42488
2007-10-01 16:03:14 +00:00
Dale Johannesen c0855f8a88 remove dup comment
llvm-svn: 42486
2007-09-30 19:08:12 +00:00
Dale Johannesen 9150652b21 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 28a2c4a9c4 Simplify and fix signed int -> FP conversions.
llvm-svn: 42483
2007-09-30 18:17:01 +00:00
Gordon Henriksen 0b7cf862bc 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 46ade4eb9b 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 18a9273e61 Add a new DenseSet abstraction.
llvm-svn: 42474
2007-09-30 00:47:20 +00:00
Duncan Sands f72ff0c379 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 f5aa229ede This is done already.
llvm-svn: 42467
2007-09-29 02:23:08 +00:00
Gordon Henriksen 37ca83d4e9 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 6547e5a2bc Demoting CHelpers.h to include/llvm/Support.
llvm-svn: 42465
2007-09-29 01:38:42 +00:00