Commit Graph

62852 Commits

Author SHA1 Message Date
Daniel Dunbar 88719a1dd6 Revert r75614 which depend on r75610 (for LLVM), which was reverted.
--- Reverse-merging r75614 into '.':
U    lib/CodeGen/CGDebugInfo.cpp

llvm-svn: 75639
2009-07-14 16:40:28 +00:00
Daniel Dunbar eb3e4271e8 Revert r7561{9,8,7,6}, which depend on r75610.
--- Reverse-merging r75619 into '.':
U    lib/Target/DarwinTargetAsmInfo.cpp
U    lib/CodeGen/AsmPrinter/AsmPrinter.cpp
--- Reverse-merging r75618 into '.':
U    lib/CodeGen/ELFWriter.cpp
U    lib/CodeGen/MachOCodeEmitter.cpp
U    lib/CodeGen/MachOWriter.cpp
--- Reverse-merging r75617 into '.':
U    lib/Target/CBackend/CBackend.cpp
--- Reverse-merging r75616 into '.':
U    tools/bugpoint/Miscompilation.cpp
U    tools/lto/LTOCodeGenerator.cpp
U    tools/lto/LTOModule.cpp

llvm-svn: 75638
2009-07-14 16:25:11 +00:00
Daniel Dunbar 6c5282e3db Revert r75615, which depended on 75610.
--- Reverse-merging r75615 into '.':
U    lib/Target/XCore/XCoreAsmPrinter.cpp
U    lib/Target/PIC16/PIC16AsmPrinter.cpp
U    lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp
U    lib/Target/MSP430/MSP430AsmPrinter.cpp
U    lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp
U    lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp
U    lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
U    lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
U    lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp
U    lib/Target/MSIL/MSILWriter.cpp
U    lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp
U    lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp

llvm-svn: 75637
2009-07-14 16:12:13 +00:00
Daniel Dunbar 966932ccb7 Revert r75610 (and r75620, which was blocking the revert), in the hopes of
unbreaking llvm-gcc (on Darwin).

--- Reverse-merging r75620 into '.':
U    include/llvm/Support/Mangler.h
--- Reverse-merging r75610 into '.':
U    test/CodeGen/X86/loop-hoist.ll
G    include/llvm/Support/Mangler.h
U    lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
U    lib/VMCore/Mangler.cpp

llvm-svn: 75636
2009-07-14 15:57:55 +00:00
Steve Naroff 5ec6ff7678 Add a "TypeSpecStartLoc" to FieldDecl. Patch contributed by Enea Zaffanella.
Note: One day, it might be useful to consider adding this info to DeclGroup (as the comments in FunctionDecl/VarDecl suggest). For now, I think this works fine. I considered moving this to ValueDecl (a common ancestor of FunctionDecl/VarDecl/FieldDecl), however this would add overhead to EnumConstantDecl (which would burn memory and isn't necessary).
llvm-svn: 75635
2009-07-14 14:58:18 +00:00
Dan Gohman f34f8634e7 Make SCEVCallbackVH::allUsesReplacedWith more thorough in removing
users from the Scalars map.

llvm-svn: 75634
2009-07-14 14:34:04 +00:00
Dan Gohman e141364e5c Require IVUsers after LCSSA, since LCSSA does not preserve IVUsers.
This results in the pass manager running IVUsers only once for
indvars, instead of twice.

llvm-svn: 75633
2009-07-14 14:26:23 +00:00
Dan Gohman 92b4c7f355 Add a comment about why ScalarEvolution doesn't recognize non-loop PHIs
even when they're obvious.

llvm-svn: 75632
2009-07-14 14:06:25 +00:00
Torok Edwin 1ab40bef8d After converting assert(0) to LLVM_UNREACHABLE we lost file/line location.
Fix by making the LLVM_UNREACHABLE pass __FILE__ and __LINE__ to
llvm_unreachable.

llvm-svn: 75631
2009-07-14 12:49:22 +00:00
Torok Edwin 6cdb897258 eliminate extra space.
llvm-svn: 75630
2009-07-14 12:22:58 +00:00
Anton Korobeynikov ba70a9b0c7 Add extra sign extension to the same bit width before int sign
extension to another bit width. This is needed to get correct singed value.
Patch by Artur Pietrek!

llvm-svn: 75629
2009-07-14 09:53:14 +00:00
Anton Korobeynikov 1c0fecfcc3 Add missing break. Patch by Artur Pietrek!
llvm-svn: 75628
2009-07-14 09:52:47 +00:00
Alisdair Meredith ed28f6e433 Fix the build
llvm-svn: 75627
2009-07-14 08:10:06 +00:00
Daniel Dunbar 277e11b116 Move main llvm-prof functionality into a ModulePass.
- To support using the ProfileInfo analysis results instead of accessing the
   ProfileInfoLoader directly.

 - Based on (part of) a patch by Andreas Neustifter.

 - No functionality change.

llvm-svn: 75625
2009-07-14 07:41:11 +00:00
Daniel Dunbar 9afad0888d ProfileInfo interface tweaks.
- Add getExecutionCount(const Function).

 - Add helper Edge type.

 - constify.

 - No functionality change.

llvm-svn: 75623
2009-07-14 06:58:59 +00:00
Alisdair Meredith a9ad47d94c Basic support for C++0x unicode types. Support for literals will follow in an incremental patch
llvm-svn: 75622
2009-07-14 06:30:34 +00:00
Evan Cheng c0e371f143 Use http instead https for anonymous readonly check out.
llvm-svn: 75621
2009-07-14 06:23:41 +00:00
Chris Lattner 6f147a3c01 remove renamed method.
llvm-svn: 75620
2009-07-14 06:22:15 +00:00
Chris Lattner 3af24cc26f rename getValueName -> getMangledName. These two files have very
dubious looking things that I need to investigate in more detail.

llvm-svn: 75619
2009-07-14 06:21:12 +00:00
Chris Lattner 688920e511 Rename getValueName -> getMangledName
llvm-svn: 75618
2009-07-14 06:20:20 +00:00
Chris Lattner 6ec9f40ac7 rename getValueName -> getMangledName
llvm-svn: 75617
2009-07-14 06:19:21 +00:00
Chris Lattner 0639a72834 rename getValueName -> getMangledName
llvm-svn: 75616
2009-07-14 06:19:07 +00:00
Chris Lattner 027c84d2c8 Rename getValueName -> getMangledName.
llvm-svn: 75615
2009-07-14 06:18:50 +00:00
Chris Lattner 74d3c61532 use new name for method.
llvm-svn: 75614
2009-07-14 06:16:43 +00:00
Bob Wilson 40221d0d3d Remove some tabs and fix other whitespace. No functional changes.
llvm-svn: 75613
2009-07-14 06:11:12 +00:00
Bob Wilson d59ad0cb59 Fix a comment.
llvm-svn: 75612
2009-07-14 06:09:50 +00:00
Bob Wilson e749587f4a Fix an obvious error.
llvm-svn: 75611
2009-07-14 06:06:28 +00:00
Chris Lattner 774f2a2d51 Change the X86 asmprinter to use the mangler to apply suffixes like "$non_lazy_ptr"
to symbols instead of doing it with "printSuffixedName".  This gets us to the point
where there is a real separation between computing a symbol name and printing it,
something I need for MC printer stuff.

This patch also fixes a corner case bug where unnamed private globals wouldn't get
the private label prefix.

Next up, rename all uses of getValueName -> getMangledName for better greppability,
and then tackle the ppc/arm backends to eliminate "printSuffixedName".

llvm-svn: 75610
2009-07-14 06:04:35 +00:00
Lang Hames 4fe642eba8 New VNInfo alignment patch by Ryan Flynn.
llvm-svn: 75609
2009-07-14 05:46:55 +00:00
Argyrios Kyrtzidis 9cbe886cff Move the RUN lines on the same file but below the code, as suggested by Sebastian.
llvm-svn: 75608
2009-07-14 05:34:59 +00:00
Chris Lattner f34815b32f Change the internal interface to makeNameProper to take a bool that
indicates whether the label is private or not, instead of taking
prefix stuff.  One effect of this is that symbols will be generated
with *just* the private prefix, instead of both the private prefix
*and* the user-label-prefix, but this doesn't matter as long as it
is consistent.  For example we'll now get "Lfoo" instead of "L_foo".
These are just assembler temporary labels anyway, so they never even
make it into the .o file.

llvm-svn: 75607
2009-07-14 04:50:12 +00:00
Argyrios Kyrtzidis b0c86d4fe8 In Stmt::printPretty(), pass the SourceManager to dump().
llvm-svn: 75606
2009-07-14 03:20:38 +00:00
Argyrios Kyrtzidis 12563b8111 Handle redeclarations properly at the index-test tool.
llvm-svn: 75605
2009-07-14 03:20:31 +00:00
Argyrios Kyrtzidis 1506d9bc25 Introduce redecl_iterator, used for iterating over the redeclarations of a FunctionDecl or VarDecl.
It iterates over all the redeclarations, regardless of the starting point. For example:

1) int f();
2) int f();
3) int f();

if you have the (2) FunctionDecl and call redecls_begin/redecls_end to iterate, you'll get this sequence:
(2)
(1)
(3)

The motivation to introduce this was that, previously, if (3) was a function definition,
and you called getBody() at (2), it would not return it, since getBody() iterated over the previous declarations only,
so it would only check (2) and (1).

llvm-svn: 75604
2009-07-14 03:20:21 +00:00
Argyrios Kyrtzidis 0736c5ca3b Introduce FunctionDecl::getLatestDeclaration() and VarDecl::getLatestDeclaration().
For multiple redeclarations they return the last one.

Also, add some non const versions of methods.

llvm-svn: 75603
2009-07-14 03:20:08 +00:00
Argyrios Kyrtzidis ef17c07bf6 Introduce FunctionDecl::getFirstDeclaration() and VarDecl::getFirstDeclaration().
For multiple redeclarations they return the first one.

llvm-svn: 75602
2009-07-14 03:19:57 +00:00
Argyrios Kyrtzidis d49e8dd759 Add a C++ indexing test case, where we show the references of overloaded '+' plus signs.
Ok, this is a bit out of place since C++ support is way way off, but it was just too cool to not show it off :-)

llvm-svn: 75601
2009-07-14 03:19:46 +00:00
Argyrios Kyrtzidis ef1c1e572c For C++ overloaded operator calls, set the source location of the DeclRefExpr to the location of the operator.
llvm-svn: 75600
2009-07-14 03:19:38 +00:00
Argyrios Kyrtzidis e6cd787ee1 For index-test, if the ASTLocation points at a CallExpr, get a Decl out of it.
llvm-svn: 75599
2009-07-14 03:19:30 +00:00
Argyrios Kyrtzidis eeaaead736 Read/write a CXXOperatorCallExpr from/to PCH files.
llvm-svn: 75598
2009-07-14 03:19:21 +00:00
Argyrios Kyrtzidis 11a846ab53 Fixes for a couple of things:
- Declaration context of ParmVarDecls (that we got from the Declarator) was not their containing function.
- C++ out-of-line method definitions didn't get an access specifier.

Both were exposed by a crash when emitting a C++ method to a PCH file (assert at Decl::CheckAccessDeclContext()).

llvm-svn: 75597
2009-07-14 03:18:53 +00:00
Argyrios Kyrtzidis 2f0eff102c Handle struct fields through the index-test tool.
llvm-svn: 75596
2009-07-14 03:18:40 +00:00
Argyrios Kyrtzidis 558449bf79 Move the test input source code to a separate file.
That way we can freely add new RUN lines without having to correct the line part in all the -point-at options.

llvm-svn: 75595
2009-07-14 03:18:25 +00:00
Argyrios Kyrtzidis 307b0717f7 In ResolveLocationInAST, handle locations that are inside TagDecl definitions.
llvm-svn: 75594
2009-07-14 03:18:17 +00:00
Argyrios Kyrtzidis a28d145cbb In DeclReferenceMap, map FieldDecls to the MemberExprs that reference them.
llvm-svn: 75593
2009-07-14 03:18:09 +00:00
Argyrios Kyrtzidis 664b690107 Read/write TagDecl's RBraceLoc from/to PCH files.
llvm-svn: 75592
2009-07-14 03:18:02 +00:00
Argyrios Kyrtzidis 23e1f1d6be Pass the right brace SourceLocation from the Parser to the TagDecls.
llvm-svn: 75591
2009-07-14 03:17:52 +00:00
Argyrios Kyrtzidis 575fa05991 Add the SourceLocation for the right brace in TagDecl.
llvm-svn: 75590
2009-07-14 03:17:17 +00:00
Devang Patel d6c256696b Use LLVM mangler to get mangled name for debug info entry.
llvm-svn: 75589
2009-07-14 02:47:58 +00:00
Lang Hames 69008332bd Unbroke LiveInterval.
llvm-svn: 75588
2009-07-14 02:17:17 +00:00