Commit Graph

70822 Commits

Author SHA1 Message Date
Dan Gohman 969e83a4ff Replace LoopUnrollPass.cpp's custom code-size estimation code using
the new common CodeMetrics code.

llvm-svn: 85663
2009-10-31 14:54:17 +00:00
Dan Gohman fa8969f70e Simplify this code.
llvm-svn: 85662
2009-10-31 14:46:50 +00:00
Dan Gohman af94015c18 Remove an unnecessary #include.
llvm-svn: 85661
2009-10-31 14:39:43 +00:00
Dan Gohman f35b6640f6 Update CMakeLists for recent renames.
llvm-svn: 85660
2009-10-31 14:38:25 +00:00
Dan Gohman f70e76c435 Rename UnrollLoop.cpp to LoopUnroll.cpp, and LoopUnroll.cpp to
LoopUnrollPass.cpp, for consistency with other passes which are
similarly split.

llvm-svn: 85659
2009-10-31 14:37:31 +00:00
Dan Gohman fb7f0e57b6 Remove CodeGenLICM. It's largely obsoleted by MachineLICM's new ability
to unfold loop-invariant loads.

llvm-svn: 85657
2009-10-31 14:35:41 +00:00
Dan Gohman ac45c9171d Make ScalarEvolutionAliasAnalysis slightly more aggressive, by making an
underlying alias call even for non-identified-object values.

llvm-svn: 85656
2009-10-31 14:32:25 +00:00
Dan Gohman 930aa9d3d2 Reapply r85634, with the bug fixed.
llvm-svn: 85655
2009-10-31 14:22:52 +00:00
Dan Gohman ba8735d25a When discarding SrcValue information, discard all of it so that code
that uses this information knows to behave conservatively.

llvm-svn: 85654
2009-10-31 14:14:04 +00:00
Dan Gohman 97abba5b6f Fix 80-column violation.
llvm-svn: 85653
2009-10-31 14:12:53 +00:00
Benjamin Kramer 6b289a9cf6 Update CMake file.
llvm-svn: 85652
2009-10-31 12:15:23 +00:00
Zhongxing Xu b1c24724dd Move CheckDivZero into its own files.
llvm-svn: 85651
2009-10-31 10:02:37 +00:00
Eric Christopher a0ca9e944f Fix warning with gcc-4.0 and signed/unsigned.
llvm-svn: 85648
2009-10-31 09:24:35 +00:00
Zhongxing Xu 358ced08d0 Move UndefDerefChecker into its own file.
llvm-svn: 85645
2009-10-31 08:44:33 +00:00
Zhongxing Xu 2261bcadd1 Add header comments.
llvm-svn: 85644
2009-10-31 04:12:21 +00:00
Evan Cheng cdbb70c065 It's safe to remat t2LDRpci; Add PseudoSourceValue to load / store's to enable more machine licm. More changes coming.
llvm-svn: 85643
2009-10-31 03:39:36 +00:00
Zhongxing Xu 5f5c954329 fix 80-col.
llvm-svn: 85642
2009-10-31 03:36:08 +00:00
Evan Cheng c16d8f2054 Revert 85634. It's breaking consumer-typeset (and others).
llvm-svn: 85641
2009-10-31 01:28:06 +00:00
Dan Gohman ea88910dbf Add a target triple so that this test behaves consistently across hosts.
llvm-svn: 85640
2009-10-31 00:15:28 +00:00
Dan Gohman 060ee82dab Add assertion checks here to turn silent miscompiles into aborts.
llvm-svn: 85639
2009-10-30 23:59:06 +00:00
Dan Gohman d814e32e57 Don't mark registers dead here when processing nodes with MVT::Flag
results. This works around a problem affecting targets which rely on
MVT::Flag to handle physical register defs.

llvm-svn: 85638
2009-10-30 23:57:47 +00:00
Dan Gohman 10eed3788d Fix the -mattr line for this test so that it passes on hosts that lack SSSE3.
llvm-svn: 85637
2009-10-30 23:18:27 +00:00
Dan Gohman 56998cdc5b Add a testcase for the recent duplicate PHI elimination changes.
llvm-svn: 85636
2009-10-30 23:16:10 +00:00
Dan Gohman 7f7d97eb73 Add a comment about a missed opportunity.
llvm-svn: 85635
2009-10-30 23:15:43 +00:00
Dan Gohman 5bec30ca5d Optimize around the fact that pred_iterator is slow: instead of sorting
PHI operands by the predecessor order, sort them by the order used by the
first PHI in the block. This is still suffucient to expose duplicates.

llvm-svn: 85634
2009-10-30 23:15:21 +00:00
Douglas Gregor 326b2fa03e Fix a crazy canonical-types bug because canonicalizing a
dependently-sized array type with a given expression might end up
returning a non-canonical type; see through that non-canonical type to
the underlying canonical type. Yes, I have a test case; no, I can't
reduce it to the point where it's worth checking in :(

llvm-svn: 85633
2009-10-30 22:56:57 +00:00
Kevin Enderby 8be42bd09f Updates to the ARM target assembler for llvm-mc per review comments from
Daniel Dunbar.
- Reordered the fields in the ARMOperand Mem struct to make the struct smaller.
Making bool's into 1 bit fields and put the MCExpr* fields adjacent to each
other.
- Fixed a number of places in ARMAsmParser.cpp so they have doxygen comments.
- Change the name of ARMAsmParser::ParseRegister() to MaybeParseRegister and
added the bool ParseWriteBack parameter.
- Changed ARMAsmParser::ParseMemory() to call MaybeParseRegister().
- Added ARMAsmParser::ParseMemoryOffsetReg to factor out parsing the offset of a
memory operand.  And use it for both parsing both preindexed and post indexing
addressing forms in ARMAsmParser::ParseMemory.
- Changed the first argument to ParseShift() to a reference.
- Changed ParseShift() to check for Rrx first and return to reduce nesting.

llvm-svn: 85632
2009-10-30 22:55:57 +00:00
Devang Patel 072b31a0bf If string field is empty then return NULL.
llvm-svn: 85630
2009-10-30 22:52:47 +00:00
Douglas Gregor 62b885d43c When looking for a copy-assignment operator to determine the cv-qualifiers on its argument type, ignore assignment operator templates
llvm-svn: 85629
2009-10-30 22:48:49 +00:00
Douglas Gregor bb3b46eb74 When a friend is declared in a dependent context, don't even try to
match it up with a declaration in the outer scope.

llvm-svn: 85628
2009-10-30 22:42:42 +00:00
Chris Lattner dd5d035302 if basic blocks are destroyed while there are *just* BlockAddress' hanging
around, then zap them.  This is analogous to dangling constantexprs hanging
off functions.

llvm-svn: 85627
2009-10-30 22:39:36 +00:00
Dan Gohman 1a95106602 Teach SimplifyCFG how to eliminate duplicate PHI nodes within a block.
This reduces codesize on a variety of codes by 1-2% on x86-64. It also
helps clean up after SSAUpdater.

llvm-svn: 85626
2009-10-30 22:39:04 +00:00
Chris Lattner 74eb5d71a3 make hasAddressTaken() constant time by storing a refcount in BB's subclass data.
llvm-svn: 85625
2009-10-30 22:33:29 +00:00
Bob Wilson c7415bf536 Add a note about Robert Muth's alternate jump table implementation.
llvm-svn: 85624
2009-10-30 22:22:46 +00:00
Dan Gohman 13e41edc71 Sort the incoming values in PHI nodes to match the predecessor order.
This helps expose duplicate PHIs, which will make it easier for them
to be eliminated.

llvm-svn: 85623
2009-10-30 22:22:22 +00:00
Dan Gohman 49fa51d936 Fix MachineLICM to use the correct virtual register class when
unfolding loads for hoisting.  getOpcodeAfterMemoryUnfold returns the
opcode of the original operation without the load, not the load
itself, MachineLICM needs to know the operand index in order to get
the correct register class. Extend getOpcodeAfterMemoryUnfold to
return this information.

llvm-svn: 85622
2009-10-30 22:18:41 +00:00
Chris Lattner 112caed500 it isn't valid to take the address of the entry block.
llvm-svn: 85621
2009-10-30 22:15:48 +00:00
Douglas Gregor 1d0015f8e1 Improved fix for PR3844, which recovers better for class template
partial specializations and explicit instantiations of non-templates.

llvm-svn: 85620
2009-10-30 22:09:44 +00:00
Devang Patel 13cb281013 If a type is derived from a derived type then calculate size appropriately.
llvm-svn: 85619
2009-10-30 22:09:30 +00:00
Ted Kremenek 5c2040b182 Tighten computation of ExprVal using ?: expression. No functionality change.
llvm-svn: 85618
2009-10-30 22:01:29 +00:00
Douglas Gregor 916462b2f7 Improve diagnostics when parsing something like
template<> struct foo<int> { ... };

where "foo" does not refer to a template. Fixes PR3844.

llvm-svn: 85616
2009-10-30 21:46:58 +00:00
Jim Grosbach 95e6e933ed Build in ARM mode explicitly when on ARM Darwin
llvm-svn: 85615
2009-10-30 21:33:05 +00:00
Daniel Dunbar 4759a8979c Add missing substitution for %llvmgcc_only.
llvm-svn: 85614
2009-10-30 21:13:59 +00:00
Douglas Gregor 412e8bc56d Instantiate class template friends better; fixes PR5332.
llvm-svn: 85612
2009-10-30 21:07:27 +00:00
Jim Grosbach dc916f11b5 Allow cross target build
llvm-svn: 85611
2009-10-30 20:54:59 +00:00
Bob Wilson 6b00f4b7a8 Fix a comment.
llvm-svn: 85610
2009-10-30 20:13:25 +00:00
Evan Cheng 5a6b9c40d6 Add option to createGVNPass to disable PRE.
llvm-svn: 85609
2009-10-30 20:12:24 +00:00
Evan Cheng 28f052fc89 I forgot to commit this test.
llvm-svn: 85608
2009-10-30 20:03:40 +00:00
Jim Grosbach 885fdd378a When cross-building, the CFLAGS and CXXFLAGS are for the target, and don't
apply to the build tools. If we want to allow build tool flags input, we
should have separate inputs (BUILD_CFLAGS and BUILD_CXXFLAGS, perhaps).

llvm-svn: 85607
2009-10-30 19:53:38 +00:00
Jim Grosbach b2dfe8b19a Remove extraneous comment line
llvm-svn: 85606
2009-10-30 19:52:05 +00:00