Commit Graph

68982 Commits

Author SHA1 Message Date
Chris Lattner 351a7ef01a add a new DirectiveMap stringmap, which allows more efficient dispatching
to directive handlers and allows for easier extensibility.

I only switched a few over for now.

llvm-svn: 82926
2009-09-27 21:16:52 +00:00
Nick Lewycky 199c563cc8 Link order: it matters.
llvm-svn: 82925
2009-09-27 20:58:01 +00:00
Ted Kremenek 67b216a1d9 Add FIXME comment.
llvm-svn: 82924
2009-09-27 20:50:04 +00:00
Chris Lattner b391e87263 allow pushing icmps through phis with multiple uses and across critical edges.
These are important to push up to encourage jump threading.  This shrinks 176.gcc a bit.

llvm-svn: 82923
2009-09-27 20:46:36 +00:00
Ted Kremenek e41b81e9ab Fix:
<rdar://problem/6914474> checker doesn't realize that variable might
have been assigned if a pointer to that variable was passed to another
function via a structure

The problem here was the RegionStoreManager::InvalidateRegion didn't
invalidate the bindings of invalidated regions.  This required a
rewrite of this method using a worklist.

As part of this fix, changed ValueManager::getConjuredSymbolVal() to
require a 'void*' SymbolTag argument.  This tag is used to
differentiate two different symbols created at the same location.

llvm-svn: 82920
2009-09-27 20:45:21 +00:00
Chris Lattner ae289632ef Enhance the previous fix for PR4895 to allow more values than just
simple constants for the true/false value of the select.  We now
do phi translation etc.  This really fixes PR4895 :)

llvm-svn: 82917
2009-09-27 20:18:49 +00:00
Anders Carlsson 02bca738b4 Mangle dependent name expressions. Fixes PR5063.
llvm-svn: 82915
2009-09-27 20:11:34 +00:00
Chris Lattner facb867af3 implement PR4895, by making FoldOpIntoPhi handle select conditions
that are phi nodes.  Also tighten up FoldOpIntoPhi to treat constantexpr
operands to phis just like other variables, avoiding moving constantexpr
computations around.

Patch by Daniel Dunbar.

llvm-svn: 82913
2009-09-27 19:57:57 +00:00
Anders Carlsson d122de5f32 Use mangleTemplatePrefix when we know that we're mangling a nested template name.
llvm-svn: 82912
2009-09-27 19:53:49 +00:00
Chris Lattner 10a1cfd0f9 avoid copying MCAsmInfo by value, add an (extremely low prio) fixme.
llvm-svn: 82911
2009-09-27 19:38:39 +00:00
Anders Carlsson 52d78a518a CodeGen for try statements. (We just emit the body for now).
llvm-svn: 82910
2009-09-27 18:58:34 +00:00
Tilmann Scheller 336e2bd91b Use explicit structs instead of std::pair to map callee saved regs to spill slots.
llvm-svn: 82909
2009-09-27 17:58:47 +00:00
Dan Gohman cb663d749d Delete a bogus comment.
llvm-svn: 82908
2009-09-27 17:50:44 +00:00
Dan Gohman 2115154d44 Remove a redundant assert.
llvm-svn: 82907
2009-09-27 17:48:37 +00:00
Jeffrey Yasskin c3273dca48 Enable -g with DEBUG_SYMBOLS and --enable-debug-symbols instead of
DEBUG_RUNTIME.

llvm-svn: 82906
2009-09-27 17:47:29 +00:00
Dan Gohman 2aab867048 Fix SCEVExpander's canonical addrec expansion code to work on loops that
aren't in canonical loop-simplify form, since it doesn't itself depend
on LoopSimplify. This means handling loops without preheaders and loops
with multiple backedges.

llvm-svn: 82905
2009-09-27 17:46:40 +00:00
Dan Gohman bb85dd6f33 Add dominates and releaseMemory member functions to PostDominatorTree.
llvm-svn: 82904
2009-09-27 17:39:12 +00:00
Dan Gohman 0e70af36c0 Grab an LLVM Context from an instruction that exists rather than one
that is deleted in some situations. This fixes a use-after-free.

llvm-svn: 82903
2009-09-27 16:10:30 +00:00
Dan Gohman e28bd65aed Clarify a comment.
llvm-svn: 82902
2009-09-27 15:41:19 +00:00
Dan Gohman fc20b67e80 Tell ScalarEvolution to forget everything it knows about a loop before
rotating the loop, since loop rotation is a very significant change.

llvm-svn: 82901
2009-09-27 15:37:03 +00:00
Dan Gohman 4338f905b7 Micro-optimize DerivedType::dropAllTypeUses.
llvm-svn: 82900
2009-09-27 15:32:21 +00:00
Dan Gohman 6daa565cf9 Instead of testing whether an instruction dominates the loop preheader,
test whether it properly dominates the loop header. This is equivalent
when the loop has a preheader, and has the advantage of working when
the loop doesn't have a preheader. Since IVUsers doesn't Require
LoopSimplify, the loop isn't guaranteed to have a preheader.

llvm-svn: 82899
2009-09-27 15:30:00 +00:00
Dan Gohman f39a3a9288 Add a properlyDominates member function to ScalarEvolution.
llvm-svn: 82898
2009-09-27 15:26:03 +00:00
Dan Gohman 0523507a2f Remove a redundant #include.
llvm-svn: 82897
2009-09-27 15:21:52 +00:00
Torok Edwin 819d15c7d9 Avoid using mutex locks if not in multithreaded mode by using a SmartScopedMutex
in RegisterStatistic.

llvm-svn: 82896
2009-09-27 11:08:03 +00:00
Cedric Venet 67f09df0db CMake generate VS2008 project and CLang and LLVM compile without problem on VS2008. Remove obsolete remark
llvm-svn: 82895
2009-09-27 10:34:36 +00:00
Cedric Venet bc8d0dec5d Handle Eli remark on mingw __declspec macro definition
llvm-svn: 82894
2009-09-27 10:09:11 +00:00
Evan Cheng a6b9cab822 Enable pre-regalloc load / store multiple pass for Thumb2.
llvm-svn: 82893
2009-09-27 09:46:04 +00:00
Chris Lattner 5e0c74780a rename REG -> REGISTER to make it explicit in the doc. <tt>ify some stuff.
llvm-svn: 82892
2009-09-27 08:01:44 +00:00
Chris Lattner 8879e06d0a implement and document support for filecheck variables. This
allows matching and remembering a string and then matching and
verifying that the string occurs later in the file.

Change X86/xor.ll to use this in some cases where the test was
checking for an arbitrary register allocation decision.

llvm-svn: 82891
2009-09-27 07:56:52 +00:00
Nick Lewycky 14d1cccc2b Remove dead code from this function and optimize. Update its corresponding
LangRef entry too.

llvm-svn: 82890
2009-09-27 07:55:32 +00:00
Nick Lewycky 42fb7452df Instruction::clone does not need to take an LLVMContext&. Remove that and
update all the callers.

llvm-svn: 82889
2009-09-27 07:38:41 +00:00
Nick Lewycky b56e1ab033 Filecheckify this one test.
llvm-svn: 82888
2009-09-27 06:25:05 +00:00
Nick Lewycky 147d40d4a2 Leave a pointer to the documentation so that people don't end up change one but
not the other in the future.

llvm-svn: 82887
2009-09-27 04:57:35 +00:00
Nick Lewycky f32f698919 Correct the version numbers to match those actually tested for by
autoconf/AutoRegen.sh.

llvm-svn: 82886
2009-09-27 04:56:27 +00:00
Anders Carlsson 9bf787ad1f Look for substitutions when mangling TypenameTypes.
llvm-svn: 82885
2009-09-27 01:06:07 +00:00
Nick Lewycky 84a1eeb7ed Move the integer type out of 'derived' and into 'primitive'. This permits us
to explain that derived types are all composed of other types, which primitive
types aren't. Without moving integer out of derived, this wouldn't be true.

Perform a few trivial cleanups; 'i1' went from a link to #t_primitive to
#t_integer (a holdover from when it was a bool type I suppose).

llvm-svn: 82884
2009-09-27 00:45:11 +00:00
Anders Carlsson e00745b285 Better template parameter type mangling.
llvm-svn: 82883
2009-09-27 00:38:53 +00:00
Anders Carlsson 2e5935241a Mangle std::basic_string<char, std::char_traits<char>, std::allocator<char> > as Ss.
llvm-svn: 82882
2009-09-27 00:12:57 +00:00
Anders Carlsson 853bb50382 Mangle ::std::basic_string as Sb.
llvm-svn: 82881
2009-09-26 23:14:39 +00:00
Anders Carlsson 872ce0dc31 Mangle ::std::allocator as Sa.
llvm-svn: 82880
2009-09-26 23:10:05 +00:00
Anders Carlsson 3e83c30c4c Handle substitutions in mangleTemplatePrefix.
llvm-svn: 82879
2009-09-26 22:18:22 +00:00
Anders Carlsson 46f87dcad4 Make Decl::dump const.
llvm-svn: 82878
2009-09-26 21:58:53 +00:00
Chris Lattner 37d8015dc1 remove support for "NoSub" from regex. It seems like a minor optimization
and makes the API more annoying.  Add a Regex::getNumMatches() method.

llvm-svn: 82877
2009-09-26 21:27:04 +00:00
Chris Lattner a26b471f1d builtin_trap should be noreturn, this fixes PR5062, patch by
Roman Divacky!

llvm-svn: 82876
2009-09-26 21:16:00 +00:00
Douglas Gregor 2208a2912c Simplify the handling of non-dependent friend class template
specializations such as:

  friend class std::vector<int>;

by using the same code path as explicit specializations, customized to
reference an existing ClassTemplateSpecializationDecl (or build a new
"undeclared" one).

llvm-svn: 82875
2009-09-26 20:57:03 +00:00
Anders Carlsson aa9e3c8793 Substitute "::std::" as "St".
llvm-svn: 82874
2009-09-26 20:53:44 +00:00
Torok Edwin fd5438edee Speed up clang-only link, by really linking only clang, and not the unittests
too.

llvm-svn: 82873
2009-09-26 20:18:58 +00:00
Anders Carlsson 49232b9f42 Don't crash when trying to mangle function templates.
llvm-svn: 82872
2009-09-26 20:13:56 +00:00
Anders Carlsson 26e67afd1e mangleTemplatePrefix and mangleUnscopedTemplateName should take a TemplateDecl.
llvm-svn: 82871
2009-09-26 19:45:45 +00:00