Commit Graph

68438 Commits

Author SHA1 Message Date
Daniel Dunbar 1cbaae56cf Switch CGDebugInfo type cache to using an AssertingVH.
llvm-svn: 82321
2009-09-19 19:27:24 +00:00
Daniel Dunbar de870bdcf2 Factor out CGDebugInfo::CreateTypeNode method.
- No functionality change.

llvm-svn: 82320
2009-09-19 19:27:14 +00:00
Nick Lewycky 3b8bd05081 Add a comment explaining why you would ever want to do this.
llvm-svn: 82319
2009-09-19 19:00:06 +00:00
Chris Lattner aecd74d895 convert a bunch of std::strings to use StringRef. This should eliminate
a massive number of temporary strings created when parsing a command line.
More still left to eliminate.

llvm-svn: 82318
2009-09-19 18:55:05 +00:00
Nick Lewycky 7e6deb1cb4 Lett users of sparse propagation do their own thing with phi nodes if they want
to. This can be combined with LCSSA or SSI form to store more information on a
PHINode than can be computed by looking at its incoming values.

llvm-svn: 82317
2009-09-19 18:33:36 +00:00
Duncan Sands 1636b7ef47 The flag "--dot-cfg-only" is at the moment equivalent to the flag "--dot-cfg".
It prints the content of all bbs, instead of printing empty bbs to make the
CFG more readable.  Fix this.  Patch by Tobias Grosser.

llvm-svn: 82315
2009-09-19 11:25:44 +00:00
Evan Cheng b82b5514fe Fix funky comments.
llvm-svn: 82314
2009-09-19 10:09:15 +00:00
Evan Cheng 1c69c47b23 Update comments.
llvm-svn: 82313
2009-09-19 10:08:51 +00:00
Benjamin Kramer 543d9b2fba Try to speed up the slowest parts of the CommandLine library
- Replace std::map<std::string with StringMap
- Eliminate unnecessary std::string copies
- ~10% speed-up for clang's testsuite on my machine (debug build)

llvm-svn: 82312
2009-09-19 10:01:45 +00:00
Evan Cheng 9827ad39a7 Fix PR4926. When target hook EmitInstrWithCustomInserter() insert new basic blocks and update CFG, it should also inform sdisel of the changes so the phi source operands will come from the right basic blocks.
llvm-svn: 82311
2009-09-19 09:51:03 +00:00
Benjamin Kramer dad401dbc1 Simplify code with a StringRef.
llvm-svn: 82308
2009-09-19 08:02:46 +00:00
Douglas Gregor b5c738b434 In C++ code completion, only suggest the "template" keyword after ".",
"->", or "::" if we will be looking into a dependent context. It's not
wrong to use the "template" keyword, but it's to needed, either.

llvm-svn: 82307
2009-09-18 23:55:56 +00:00
Douglas Gregor ce23bae4f8 Make the construction of the code-completion string for a function
template smarter, by taking into account which function template
parameters are deducible from the call arguments. For example,

  template<typename RandomAccessIterator>
  void sort(RandomAccessIterator first, RandomAccessIterator last);

will have a code-completion string like

  sort({RandomAccessIterator first}, {RandomAccessIterator last})

since the template argument for its template parameter is
deducible. On the other hand,

  template<class X, class Y>
  X* dyn_cast(Y *Val);

will have a code-completion string like

  dyn_cast<{class X}>({Y *Val})

since the template type parameter X is not deducible from the function
call.

llvm-svn: 82306
2009-09-18 23:21:38 +00:00
Douglas Gregor 3f6ca38927 Introduce code completion patterns for templates, which provide the
angle brackets < > along with placeholder template arguments.

llvm-svn: 82304
2009-09-18 22:47:56 +00:00
Ted Kremenek 0ccd06c017 Re-introduce diagnostic caching in BugReporter that was originally added in
r82198 and then reverted. This is an intermediate solution, as diagnostic
caching should not rely on static variables.

llvm-svn: 82301
2009-09-18 22:37:37 +00:00
Victor Hernandez 5d034499ad Enhance transform passes so that they apply the same tranforms to malloc calls as to MallocInst.
Reviewed by Dan Gohman.

llvm-svn: 82300
2009-09-18 22:35:49 +00:00
Ted Kremenek 3d8f862596 Reintroduce FoldingSet profiling for PathDiagnostics.
llvm-svn: 82299
2009-09-18 22:33:39 +00:00
Ted Kremenek 1e7f988f5e Fix regression introduced by r82198 that caused functions/methods with invalid CFGs to get analyzed.
llvm-svn: 82297
2009-09-18 22:29:35 +00:00
Douglas Gregor fedc328ae9 Introduce code completion strings, which describe how to *use* the
results of code completion, e.g., by providing function call syntax
with placeholders for each of the parameters.

llvm-svn: 82293
2009-09-18 22:15:54 +00:00
Daniel Dunbar b90893dc41 Attempt to make a test portable.
llvm-svn: 82292
2009-09-18 22:09:24 +00:00
Chris Lattner 1457d067fa remove an extraneous mem2reg pass early in the pipe. Since
this is run after the 'standard function passes', SRoA was
recently run.  This saves a domfrontier construction. Thanks
to Eli for noticing this.

llvm-svn: 82291
2009-09-18 22:03:29 +00:00
Chris Lattner b069ec63a4 reduce indentation by using an early exit, and add a comment,
no functionality change.

llvm-svn: 82290
2009-09-18 22:01:30 +00:00
Bob Wilson 8c33d67fbf Fix a comment typo and some whitespace.
llvm-svn: 82285
2009-09-18 21:43:11 +00:00
Bob Wilson 3c21a35908 Fix a typo in an assertion message.
llvm-svn: 82284
2009-09-18 21:42:44 +00:00
Bill Wendling 053237109a Factor out label difference creation.
llvm-svn: 82282
2009-09-18 21:37:56 +00:00
Victor Hernandez 537d8d99be Enhance analysis passes so that they apply the same analysis to malloc calls as to MallocInst.
Reviewed by Eli Friedman.

llvm-svn: 82281
2009-09-18 21:34:51 +00:00
Dan Gohman 51f5442403 Delete the label names from this test to make it less fragile.
llvm-svn: 82276
2009-09-18 21:23:12 +00:00
Bill Wendling 43f2cd7757 It's inefficient to have place the exception tables (which contain the LSDA)
into the __DATA section. At launch time, dyld has to update most of the section
to fix up the type info pointers. It's better to place it into the __TEXT
section and use pc-rel indirect pointer encodings. Similar to the personality
routine.

llvm-svn: 82274
2009-09-18 21:14:36 +00:00
Evan Cheng 270d0f986f Enhance EmitInstrWithCustomInserter() so target can specify CFG changes that sdisel will use to properly complete phi nodes.
Not functionality change yet.

llvm-svn: 82273
2009-09-18 21:02:19 +00:00
Chris Lattner abbfd629dc clean up xcode proj
llvm-svn: 82272
2009-09-18 20:39:54 +00:00
Chris Lattner 3e8b4f6637 allow clearing this value.
llvm-svn: 82271
2009-09-18 20:39:46 +00:00
Shantonu Sen 7ba874bb5e Fix cmake build, which has a different -I that
causes the "../foo" to not find the file

llvm-svn: 82270
2009-09-18 20:35:59 +00:00
Chris Lattner 3a78ce3a56 Make a new X8632_MachoTargetObjectFile TLOF implementation whose
getSymbolForDwarfGlobalReference is smart enough to know that it 
needs to register the stub it references with MachineModuleInfoMachO,
so that it gets emitted at the end of the file.

Move stub emission from X86ATTAsmPrinter::doFinalization to the
new X86ATTAsmPrinter::EmitEndOfAsmFile asmprinter hook.  The important
thing here is that EmitEndOfAsmFile is called *after* the ehframes are
emitted, so we get all the stubs.

This allows us to remove a gross hack from the asmprinter where it would
"just know" that it needed to output stubs for personality functions.
Now this is all driven from a consistent interface.

The testcase change is just reordering the expected output now that the
stubs come out after the ehframe instead of before.

This also unblocks other changes that Bill wants to make.

llvm-svn: 82269
2009-09-18 20:22:52 +00:00
Chris Lattner 71a15b1316 add a new hook to allow targets to splat stuff at the end of the file.
Overriding doFinalization is pretty lame.

llvm-svn: 82268
2009-09-18 20:17:03 +00:00
Dale Johannesen 5e9a5c3664 Model the carry bit on ppc32. Without this we could
move a SUBFC (etc.) below the SUBFE (etc.) that consumed
the carry bit.  Add missing ADDIC8, noticed along the way.

llvm-svn: 82266
2009-09-18 20:15:22 +00:00
Anders Carlsson 82b688e423 More mangling work.
llvm-svn: 82265
2009-09-18 20:11:09 +00:00
Douglas Gregor c811ede9b7 C++ code completion after the "operator" keyword. Provide overloaded
operators, type specifiers, type names, and nested-name-specifiers.

llvm-svn: 82264
2009-09-18 20:05:18 +00:00
Dan Gohman 722b1eefdb Add support for using the FLAGS result of or, xor, and and instructions
on x86, to avoid explicit test instructions. A few existing tests changed
due to arbitrary register allocation differences.

llvm-svn: 82263
2009-09-18 19:59:53 +00:00
Anders Carlsson c3773bd669 Make the mangler conform even better to the grammar.
llvm-svn: 82262
2009-09-18 19:44:50 +00:00
Sean Callanan 8e31aa773f Added RCL and RCR (rotate left and right with a
carry bit) instructions to the Intel instruction
tables.

llvm-svn: 82260
2009-09-18 19:35:23 +00:00
Devang Patel af206b8c88 Write and read metadata attachments.
llvm-svn: 82259
2009-09-18 19:26:43 +00:00
Victor Hernandez 788eaabd18 Update malloc call creation code (AllocType is now the element type of the malloc, not the resulting type).
In getMallocArraySize(), fix bug in the case that array size is the product of 2 constants.

Extend isArrayMalloc() and getMallocArraySize() to handle case where malloc is used as char array.

Ensure that ArraySize in LowerAllocations::runOnBasicBlock() is correct type.

Extend Instruction::isSafeToSpeculativelyExecute() to handle malloc calls.

Add verification for malloc calls.

Reviewed by Dan Gohman.

llvm-svn: 82257
2009-09-18 19:20:02 +00:00
Anders Carlsson 327c8df90c Make our char vector types not be explicitly signed to match GCC and to fix compilation with C++ and -fno-lax-vector-conversions
llvm-svn: 82254
2009-09-18 19:18:19 +00:00
Mike Stump f9c95be2f6 Generate more of the vbase virtual offset for covariant thunks. WIP.
llvm-svn: 82253
2009-09-18 19:06:35 +00:00
Douglas Gregor 7e90c6db18 Introduce four new code-completion hooks for C++:
- after "using", show anything that can be a nested-name-specifier.
  - after "using namespace", show any visible namespaces or namespace aliases
  - after "namespace", show any namespace definitions in the current scope
  - after "namespace identifier = ", show any visible namespaces or
    namespace aliases

llvm-svn: 82251
2009-09-18 19:03:04 +00:00
Anders Carlsson 559d9741a8 More mangler mangling.
llvm-svn: 82250
2009-09-18 19:00:18 +00:00
Anders Carlsson caf4a646f8 Call mangleTemplatePrefix.
llvm-svn: 82247
2009-09-18 18:47:07 +00:00
Anders Carlsson c1370cb49b Change manglePrefix to return early if the DC is the translation unit.
llvm-svn: 82246
2009-09-18 18:39:58 +00:00
Chris Lattner e133923abe duncan points out the EH selector values are signed.
llvm-svn: 82245
2009-09-18 18:34:29 +00:00
Chris Lattner 42bb0c1f8f convert some stuff to StringRef to avoid temporary std::strings.
llvm-svn: 82244
2009-09-18 18:31:37 +00:00