Commit Graph

80193 Commits

Author SHA1 Message Date
David Chisnall 2bfc50bf68 Fixed copy-and-paste error causing categories to contain the protocols declared on the class, not the protocols declared on the category.
llvm-svn: 98455
2010-03-13 22:20:45 +00:00
Daniel Dunbar 56597588f0 MC/Mach-O: Initial x86_64 support.
llvm-svn: 98454
2010-03-13 22:10:17 +00:00
Daniel Dunbar c19fb6f96d macho-dump: Basic Mach 64 support.
llvm-svn: 98453
2010-03-13 22:10:11 +00:00
Benjamin Kramer f156b9d55d Revert 98439. There is a bad race condition in sys::Path::makeUnique on win32.
llvm-svn: 98452
2010-03-13 21:22:49 +00:00
Chris Lattner 29bdac4928 eliminate the now-unneeded context argument of MBB::getSymbol()
llvm-svn: 98451
2010-03-13 21:04:28 +00:00
Chris Lattner e468f88b26 rearrange MCContext ownership. Before LLVMTargetMachine created it
and passing off ownership to AsmPrinter.  Now MachineModuleInfo
creates it and owns it by value.  This allows us to use MCSymbols
more consistently throughout the rest of the code generator, and
simplifies a bit of code.  This also allows MachineFunction to 
keep an MCContext reference handy, and cleans up the TargetRegistry
interfaces for AsmPrinters.

llvm-svn: 98450
2010-03-13 20:55:24 +00:00
Jeffrey Yasskin 754d2dc041 Make lit pay attention to --vg for unittests too.
llvm-svn: 98449
2010-03-13 20:45:41 +00:00
Rafael Espindola a530f9c03b Add missing space.
llvm-svn: 98448
2010-03-13 20:14:52 +00:00
Jeffrey Yasskin 0374d7feb0 Allow types that have been forwarded to to be freed.
Tested: make check-lit && valgrind --dsymutil=yes --leak-check=full unittests/ExecutionEngine/JIT/Debug/JITTests
llvm-svn: 98447
2010-03-13 20:09:55 +00:00
Nick Lewycky 84189ab22b Teach this test not to leak. Also, clean up all the cast<BinaryOperator> cruft.
llvm-svn: 98446
2010-03-13 19:58:26 +00:00
Daniel Dunbar 144873437c llvm-mc: Delete output files on error.
llvm-svn: 98445
2010-03-13 19:31:47 +00:00
Daniel Dunbar 906a432031 MC/X86_64: Fix matching of leaq.
llvm-svn: 98444
2010-03-13 19:31:44 +00:00
Daniel Dunbar e60c883bf4 MC/X86_64: Fix matching of callq.
llvm-svn: 98443
2010-03-13 19:31:38 +00:00
Chris Lattner 341b1d25f1 add a hack to allow parsing negative minint. rdar://7751341
llvm-svn: 98442
2010-03-13 19:25:13 +00:00
Douglas Gregor b14d123774 Give explicit template instantiations weak ODR linkage. Former
iterations of this patch gave explicit template instantiation
link-once ODR linkage, which permitted the back end to eliminate
unused symbols. Weak ODR linkage still requires the symbols to be
generated.

llvm-svn: 98441
2010-03-13 18:23:07 +00:00
Rafael Espindola 13327bbe55 Fix PR6562. If a type is dependent, we don't know if it will have implicit
destructors.

llvm-svn: 98440
2010-03-13 18:12:56 +00:00
Benjamin Kramer 84c37f9903 Make getTemporaryPath a static member of CIndexer and use it to replace tmpnam calls.
This fixes linker warnings on linux.

llvm-svn: 98439
2010-03-13 13:05:20 +00:00
Benjamin Kramer 69b3c43391 Use raw_ostream instead of sprintf.
llvm-svn: 98438
2010-03-13 12:06:51 +00:00
Benjamin Kramer 5ac3b0be2d Simplify code.
llvm-svn: 98437
2010-03-13 11:34:41 +00:00
Kovarththanan Rajaratnam ba2c65277a Use SmallString instead of SmallVector
llvm-svn: 98436
2010-03-13 10:17:05 +00:00
Kovarththanan Rajaratnam e5f1c197af No need to call setIdentifierInfo() after LookUpIdentifierInfo() which LookUpIdentifierInfo() will automatically do
llvm-svn: 98435
2010-03-13 08:53:33 +00:00
Chris Lattner 10ebb68a49 add builder support for mcsymbol operands.
llvm-svn: 98434
2010-03-13 08:16:25 +00:00
Chris Lattner 6c604e3f94 add support for MCSymbols as operands to MachineInstrs.
llvm-svn: 98433
2010-03-13 08:14:18 +00:00
Chris Lattner 41e275dc8e simplify EmitFrameMoves to take BaseLabel in as a symbol
instead of as a stem+idx pair, simplify the "is a new 
location" check to use symbol comparison.

llvm-svn: 98432
2010-03-13 08:05:25 +00:00
Chris Lattner 5bb8207c13 simplify some overly general code. The stack always grows down on x86.
llvm-svn: 98431
2010-03-13 08:04:35 +00:00
Benjamin Kramer 13f4db8c29 Fix another warning. There is a functionality change but I believe it's correct.
llvm-svn: 98430
2010-03-13 07:50:22 +00:00
Chris Lattner 8811e12314 factor some labels, simplify some code.
llvm-svn: 98429
2010-03-13 07:40:56 +00:00
Benjamin Kramer e5b2c1d9be Add some parens and silence a warning.
llvm-svn: 98428
2010-03-13 07:40:34 +00:00
Bob Wilson f1e8f7ff7d Attempt to appease the arm-linux buildbot by fixing the JIT encodings for new
base register updating load/store-multiple instructions.

llvm-svn: 98427
2010-03-13 07:34:35 +00:00
Chris Lattner 2c3f478c0b various cleanups.
llvm-svn: 98426
2010-03-13 07:26:18 +00:00
Douglas Gregor 17b76185f1 Re-revert the explicit template instantiation linkage patch. I am beginning to look incompetent
llvm-svn: 98425
2010-03-13 03:49:57 +00:00
Douglas Gregor 89cae0f224 Reinstate patch to turn explicit template instantiations into weak symbols
llvm-svn: 98424
2010-03-13 03:14:19 +00:00
Ted Kremenek d071c6019a Implement several CIndex functions for constructing USRs from C-strings instead of AST elements.
llvm-svn: 98421
2010-03-13 02:50:34 +00:00
Daniel Dunbar 34b8e553ea MC/Mach-O: PCrel relocations weren't using the right base address, they are
relative to the fragment address, not its offset. This was masked by the text
section normally being at address 0.

llvm-svn: 98420
2010-03-13 02:38:00 +00:00
Daniel Dunbar 322fec671b llvm-mc: Support -n, useful for comparing -integrated-as output since the
compiler may not lead with the text section.

llvm-svn: 98418
2010-03-13 02:20:57 +00:00
Daniel Dunbar 4689211583 llvm-mc: Support -arch as a simplified form of -triple.
llvm-svn: 98417
2010-03-13 02:20:38 +00:00
Evan Cheng 2a65429671 Fix a typo in ValueTracking that's causing instcombine to delete needed shift instructions.
llvm-svn: 98416
2010-03-13 02:20:29 +00:00
Chris Lattner b7aa9527ef reimplement the string pool used for inlined function
entries to not thrash std::strings and MCSymbols.

llvm-svn: 98415
2010-03-13 02:17:42 +00:00
Jeffrey Yasskin 61e710c2fd Remove the last memory leak from the VMCore unit tests.
Tested: valgrind --leak-check=full unittests/VMCore/Debug/VMCoreTests
llvm-svn: 98414
2010-03-13 02:15:08 +00:00
Chris Lattner 81fe45d911 switch to the text section at the start of the .s file for darwin/x86
targets.  This is a temporary hack for the .o file writer that Daniel
wants :)

llvm-svn: 98413
2010-03-13 02:10:00 +00:00
Jeffrey Yasskin 3d73d1a73c Remove a memory leak from MetadataTest.
Tested: valgrind --leak-check=full unittests/VMCore/Debug/VMCoreTests
llvm-svn: 98412
2010-03-13 01:39:20 +00:00
Jeffrey Yasskin 5a952b1339 Remove a memory leak from VerifierTest.
Tested: valgrind --leak-check=full unittests/VMCore/Debug/VMCoreTests
llvm-svn: 98411
2010-03-13 01:34:56 +00:00
Jeffrey Yasskin 2cc2476198 Delete MDNodes when LLVMContext is destroyed. Previous attempts: r97918, r97788.
Tested: clang debug bootstrap, llvm-gcc bootstrap, `make check-lit`
after configuring with --with-llvmgccdir (and this did run the
FrontendC* tests this time)

llvm-svn: 98410
2010-03-13 01:26:15 +00:00
Bob Wilson 947f04bad0 Change ARM ld/st multiple instructions to have variant instructions for
writebacks to the address register.  This gets rid of the hack that the
first register on the list was the magic writeback register operand.  There
was an implicit constraint that if that operand was not reg0 it had to match
the base register operand.  The post-RA scheduler's antidependency breaker
did not understand that constraint and sometimes changed one without the
other.  This also fixes Radar 7495976 and should help the verifier work
better for ARM code.

There are now new ld/st instructions explicit writeback operands and explicit
constraints that tie those registers together.

llvm-svn: 98409
2010-03-13 01:08:20 +00:00
Devang Patel 93142469ac Do not ignore arg_size() impact while counting bb instructions.
llvm-svn: 98408
2010-03-13 01:05:02 +00:00
Daniel Dunbar 18fc344290 MC/X86: Add temporary hack to match shrl $1,%eax correctly, to support testing
other functionality on 403.gcc compiled at -O0.

llvm-svn: 98405
2010-03-13 00:47:29 +00:00
Daniel Dunbar b86672059e MC/X86: Add an XFAIL test where we aren't matching the correct instruction
because we don't understand how the specific instruction is doing sign
extension.

llvm-svn: 98404
2010-03-13 00:47:25 +00:00
Devang Patel 877d0355bd Remove extra parameter.
llvm-svn: 98403
2010-03-13 00:45:31 +00:00
Bob Wilson 53149401ee Combine the code to build VLDM and VSTM instructions, since they are
mostly the same.

llvm-svn: 98402
2010-03-13 00:43:32 +00:00
Devang Patel ad591dc6af Do not overestimate code size reduction in presense of debug info.
Use CodeMetrics.analyzeBasicBlock() to estimate BB size.

llvm-svn: 98401
2010-03-13 00:10:20 +00:00