Commit Graph

79758 Commits

Author SHA1 Message Date
Ted Kremenek fe697ebaaf Remove '#if 0' code. Lazy compound values have proven their worth.
llvm-svn: 98175
2010-03-10 19:09:34 +00:00
Ted Kremenek 1a0c4d5900 Fix -Wsign-compare warnings reported by clang++.
llvm-svn: 98174
2010-03-10 19:09:31 +00:00
Dan Gohman fc7a25dc36 Fix whitespace.
llvm-svn: 98173
2010-03-10 19:00:54 +00:00
Johnny Chen 9a3e2398ae Factored out the disassembly printing of CPS option, MSR mask, and Negative Zero
operands into their own PrintMethod, in order not to pollute the printOperand()
impl with disassembly only Imm modifiers.

llvm-svn: 98172
2010-03-10 18:59:38 +00:00
Tobias Grosser ab19e1e9b5 Fix make check with cmake/lit
PR6540: Set the newly introduced variables ENABLE_SHARED and
SHLIBPATH_VAR in lit.site.cfg not only in the autoconf build, but also
in a cmake one.

llvm-svn: 98171
2010-03-10 18:41:59 +00:00
Ted Kremenek 4a26524050 Fix -Wsign-compare warning reported by clang++.
llvm-svn: 98170
2010-03-10 18:22:38 +00:00
Richard Osborne 66839831a7 The backend now makes a reasonable job of targeting lmul / macc
llvm-svn: 98169
2010-03-10 18:14:47 +00:00
Richard Osborne 54a2c32670 Handle MVT::i64 type in DAG combine for ISD::ADD. Fold 64 bit
expression add(add(mul(x,y),a),b) -> lmul(x,y,a,b) if all
operands are zero extended.

llvm-svn: 98168
2010-03-10 18:12:27 +00:00
Daniel Dunbar 7e3283c055 Remove unneeded includes.
llvm-svn: 98167
2010-03-10 17:56:05 +00:00
Bob Wilson dfebf1ffac Testcase for pr6552. I changed the code to use "ip" instead of "fp" because
the "fp" register name is not valid on Darwin, and the "ip" register name was
broken for all ARM targets.

llvm-svn: 98166
2010-03-10 17:54:11 +00:00
Richard Osborne c99b9b2193 Fix checking of intermediates having one use in isADDADDMUL
llvm-svn: 98164
2010-03-10 17:16:29 +00:00
Richard Osborne 5a457de4b2 Extract recognition of patterns such as add(add(mul(x,y),a),b)
into a seperate function.

llvm-svn: 98162
2010-03-10 17:10:35 +00:00
Ted Kremenek 9e92d3f99d Remove the subregion map cache. It is no longer used.
llvm-svn: 98161
2010-03-10 16:38:44 +00:00
Ted Kremenek 2ce82b2323 Fix stale comment.
llvm-svn: 98160
2010-03-10 16:38:41 +00:00
Ted Kremenek ddce4a3d0f Really apply (unnoticed weird git-svn merge conflict in 98144): Refactor RegionStore::RemoveDeadBindings to use the same core cluster analysis algorithm as RegionStore::InvalidateRegions().
Beyond simplifying the algorithm significantly, we no longer
need to build subregion maps in RemoveDeadBindings().  This
and other changes cause a significant speedup: the time to
analyze sqlite3.c (single core) drops by 14%.

llvm-svn: 98159
2010-03-10 16:32:56 +00:00
Richard Osborne 11ec7ee125 Fix thinko.
llvm-svn: 98158
2010-03-10 16:27:11 +00:00
Richard Osborne 1a396d53ed Fold add(add(mul(x,y),a),b) -> lmul(x,y,a,b) if the intermediate
results are unused elsewhere.

llvm-svn: 98157
2010-03-10 16:19:31 +00:00
Benjamin Kramer 74ca599a73 Remove duplicated code. No functionality change.
llvm-svn: 98156
2010-03-10 16:04:20 +00:00
Dale Johannesen 8340cc0d6c Fix a bug in DEBUG_VALUE handling Devang ran into.
I'll get this loop right yet.

llvm-svn: 98155
2010-03-10 15:06:26 +00:00
Rafael Espindola e81620fb88 Move test and also test codegen.
llvm-svn: 98154
2010-03-10 14:01:14 +00:00
Richard Osborne f57aea3d38 Prefer LMUL to MACCU as LMUL has no tied operands.
llvm-svn: 98153
2010-03-10 13:27:10 +00:00
Richard Osborne 0012bc1e41 Custom lower (S|U)MUL_LOHI -> MACC(S|U)
llvm-svn: 98152
2010-03-10 13:20:07 +00:00
Richard Osborne ef00c1bd6f Fix indentation
llvm-svn: 98151
2010-03-10 11:42:05 +00:00
Richard Osborne 54dfa01adc Lower add (mul a, b), c into MACCU / MACCS nodes which translate
directly to the maccu / maccs instructions. We handle this in
ExpandADDSUB since after type legalisation it is messy to
recognise these operations.

llvm-svn: 98150
2010-03-10 11:41:08 +00:00
John McCall 85f9055955 When pretty-printing tag types, only print the tag if we're in C (and
therefore not creating ElaboratedTypes, which are still pretty-printed
with the written tag).

Most of these testcase changes were done by script, so don't feel too
sorry for my fingers.

llvm-svn: 98149
2010-03-10 11:27:22 +00:00
Richard Osborne e35eabdd69 Convert test to FileCheck.
llvm-svn: 98148
2010-03-10 11:24:03 +00:00
Chris Lattner 71c30c164f move three lowering hooks from MAI to TLOF and make one of them
semantic instead of syntactic.  This completes MCization of
darwin/x86[-64]!

llvm-svn: 98145
2010-03-10 07:20:42 +00:00
Ted Kremenek ba2e6c6b73 Refactor RegionStore::RemoveDeadBindings to use the same core
cluster analysis algorithm as RegionStore::InvalidateRegions().

Beyond simplifying the algorithm significantly, we no longer
need to build subregion maps in RemoveDeadBindings().  This
and other changes cause a significant speedup: the time to
analyze sqlite3.c (single core) drops by 14%.

llvm-svn: 98144
2010-03-10 07:20:03 +00:00
Ted Kremenek a2536b642c Refactor some of RegionStore's InvalidateRegionsWorker class
into a 'ClusterAnalysis' parent class.  The idea is
to potentially reuse this for reworking RemoveDeadBindings.

llvm-svn: 98143
2010-03-10 07:19:59 +00:00
Evan Cheng 72811e8714 Fix typo.
llvm-svn: 98142
2010-03-10 07:07:55 +00:00
Evan Cheng a3b6739749 Unbreak test on Linux.
llvm-svn: 98141
2010-03-10 07:07:45 +00:00
Anders Carlsson 45be0e069d Add newline.
llvm-svn: 98140
2010-03-10 06:51:56 +00:00
Anders Carlsson 804cf51dcf Don't accidentally mark some functions in construction vtables as unused. Also land the test for a previous checkin, now that it's correct.
llvm-svn: 98139
2010-03-10 06:51:42 +00:00
John McCall 96f0b5f844 Allow the fast path through ASTContext::getTypeDeclType to be inlined.
llvm-svn: 98138
2010-03-10 06:48:02 +00:00
Dale Johannesen 5ebe0c1e13 This survived a bootstrap, so let's try 98104 again.
llvm-svn: 98137
2010-03-10 05:45:47 +00:00
Zhongxing Xu 1bb6a1a593 Add use-after-free check to MallocChecker.
llvm-svn: 98136
2010-03-10 04:58:55 +00:00
Douglas Gregor 6cf3f3c75e Statement expressions can be used in global- or namespace-scoped blocks
llvm-svn: 98135
2010-03-10 04:54:39 +00:00
John McCall e78aac41de Create a new InjectedClassNameType to represent bare-word references to the
injected class name of a class template or class template partial specialization.
This is a non-canonical type;  the canonical type is still a template 
specialization type.  This becomes the TypeForDecl of the pattern declaration,
which cleans up some amount of code (and complicates some other parts, but
whatever).

Fixes PR6326 and probably a few others, primarily by re-establishing a few
invariants about TypeLoc sizes.     

llvm-svn: 98134
2010-03-10 03:28:59 +00:00
Evan Cheng 80ad113731 Enable machine cse pass.
llvm-svn: 98132
2010-03-10 03:07:41 +00:00
Anders Carlsson 02b99d6b7c When building construction vtables, we need to check if a primary virtual base is actually a primary virtual base in the layout class.
llvm-svn: 98131
2010-03-10 03:02:01 +00:00
Chris Lattner eec9bf1198 mcize the rest of EH emission, only one more directive missing
for darwin/x86 to be completely mcized.

llvm-svn: 98130
2010-03-10 02:48:06 +00:00
Rafael Espindola 69902a0a0d add missing test
llvm-svn: 98129
2010-03-10 02:43:01 +00:00
Anders Carlsson ca82a4fdba Improve vcall offset handling in construction vtables. With this we layout the construction vtables from the ABI examples correctly.
llvm-svn: 98127
2010-03-10 02:33:41 +00:00
Chris Lattner a26fbe4d68 add missing filename!
llvm-svn: 98125
2010-03-10 02:29:31 +00:00
Chris Lattner ac2361a9b0 set the temporary bit on MCSymbols correctly.
llvm-svn: 98124
2010-03-10 02:25:11 +00:00
Rafael Espindola e7113ca907 Delay codegen of vtables when handling implicit instantiations.
This fixes PR6474.

llvm-svn: 98123
2010-03-10 02:19:29 +00:00
Dan Gohman b7e0b87441 Fix a comment.
llvm-svn: 98122
2010-03-10 02:18:48 +00:00
Evan Cheng 4c5f7a7f5e Add a couple more heuristics to neuter machine cse some more.
1. Be careful with cse "cheap" expressions. e.g. constant materialization. Only cse them when the common expression is local or in a direct predecessor. We don't want cse of cheap instruction causing other expressions to be spilled.
2. Watch out for the case where the expression doesn't itself uses a virtual register. e.g. lea of frame object. If the common expression itself is used by copies (common for passing addresses to function calls), don't perform the cse. Since these expressions do not use a register, it creates a live range but doesn't close any, we want to be very careful with increasing register pressure.

Note these are heuristics so machine cse doesn't make register allocator unhappy. Once we have proper live range splitting and re-materialization support in place, these should be evaluated again.

Now machine cse is almost always a win on llvm nightly tests on x86 and x86_64.

llvm-svn: 98121
2010-03-10 02:12:03 +00:00
Daniel Dunbar 46ed804180 MC/Mach-O: Resolve a FIXME; these relocation types are no longer semanticaly different.
llvm-svn: 98120
2010-03-10 02:10:29 +00:00
Dan Gohman 16c678c8de Clarify the documentation for MachineFunctionPasses.
llvm-svn: 98119
2010-03-10 01:29:39 +00:00