Commit Graph

64637 Commits

Author SHA1 Message Date
David Greene 81bcae5fda Simplify operand padding by keying off tabs in the asm stream. If
padding is disabled, tabs get replaced by spaces except in the case of
the first operand, where the tab is output to line up the operands after
the mnemonics.

Add some better comments and eliminate redundant code.

Fix some testcases to not assume tabs.

llvm-svn: 77740
2009-07-31 21:57:10 +00:00
Daniel Dunbar 9ee33ca28e llvm-mc: Support quoted identifiers.
- Uses MCAsmToken::getIdentifier which returns the (sub)string representing the
   meaningfull contents a string or identifier token.

 - Directives aren't done yet.

llvm-svn: 77739
2009-07-31 21:55:09 +00:00
Anders Carlsson 1726aaa4fc Remove the old struct builder code.
llvm-svn: 77738
2009-07-31 21:48:56 +00:00
Mike Stump 67829f6493 And now we can generate a simple vtable. Still a work in progress...
llvm-svn: 77737
2009-07-31 21:43:43 +00:00
Chris Lattner 63779b8d57 PreferredEHDataFormat is always call with data and global, but this whole
thing is #if0'd out anyway.  Just simplify the code by reducing the interface.
Not deleting this is essential for Bill's continuing happiness.

llvm-svn: 77736
2009-07-31 21:39:55 +00:00
Anders Carlsson d65ab045e8 Move code from EmitUnion directly into the function that handles cast-to-union.
llvm-svn: 77735
2009-07-31 21:38:39 +00:00
Owen Anderson 2358732164 Fix unit tests.
llvm-svn: 77734
2009-07-31 21:38:10 +00:00
Owen Anderson 0087fe6e5c Move the metadata constructors back to 2.5 syntax.
llvm-svn: 77733
2009-07-31 21:35:40 +00:00
Anders Carlsson 0d5f37b81a Use the struct builder for unions.
llvm-svn: 77732
2009-07-31 21:34:04 +00:00
Mike Stump dd93a19ac6 Fixup spacing and 80-col violations.
llvm-svn: 77731
2009-07-31 21:31:32 +00:00
Benjamin Kramer 93468cdd3e Update unittest for LLVM API change.
llvm-svn: 77730
2009-07-31 20:56:31 +00:00
Dan Gohman e8c035df6f LibCallAliasAnalysis doesn't use TargetData.
llvm-svn: 77729
2009-07-31 20:56:29 +00:00
Daniel Dunbar 3ebf848b47 llvm-mc/X86: Sketch match functions for immediates and memory operands.
Also, change scale value to always be 1 when unspecified to machine MachineInst
encoding.

llvm-svn: 77728
2009-07-31 20:53:16 +00:00
Dan Gohman 1ee6057b21 Make TargetData optional in MemoryDependenceAnalysis.
llvm-svn: 77727
2009-07-31 20:53:12 +00:00
Chris Lattner d25701c114 move emitUsedDirectiveFor to TargetLoweringObjectFile and rename it to
indicate that it is a predicate, not an emitter.  This eliminates TAI
dependencies on Mangler and GlobalValue.

llvm-svn: 77726
2009-07-31 20:52:39 +00:00
Dan Gohman f3ee7eaac3 Remove an unnecessary header.
llvm-svn: 77725
2009-07-31 20:47:45 +00:00
Chris Lattner 740749b470 remove the PPCLinuxTargetAsmInfo implementation of PreferredEHDataFormat,
because it just calls the default impl.

Remove the PPCDarwinTargetAsmInfo version of PreferredEHDataFormat because
it just returns DW_EH_PE_absptr unless on 10.6.  However, 10.6 doesn't support
PPC, so the default impl is just fine.

llvm-svn: 77724
2009-07-31 20:43:26 +00:00
Chris Lattner 5ebf64e075 remove a pointless override.
llvm-svn: 77723
2009-07-31 20:36:15 +00:00
Owen Anderson 0b75f23b94 Update for LLVM API change.
llvm-svn: 77722
2009-07-31 20:28:54 +00:00
Owen Anderson 5a1acd9912 Move a few more APIs back to 2.5 forms. The only remaining ones left to change back are
metadata related, which I'm waiting on to avoid conflicting with Devang.

llvm-svn: 77721
2009-07-31 20:28:14 +00:00
Dan Gohman ef3ef7f645 Fix GVN's debug output, now that operator<< on Value* doesn't print
a trailing newline.

llvm-svn: 77719
2009-07-31 20:24:18 +00:00
Eric Christopher 45d7185117 Whitespace and 80-col cleanup.
llvm-svn: 77718
2009-07-31 20:07:27 +00:00
Bill Wendling 2602bb4cdc - Convert the rest of the DOUTs to DEBUG+errs().
- One formatting change.

No intended functionality change.

llvm-svn: 77717
2009-07-31 19:52:24 +00:00
Eli Friedman ca9a4f1045 PR4662: Fix a crash introduced by the recent LLVMContext changes.
llvm-svn: 77716
2009-07-31 19:36:47 +00:00
Dan Gohman 01ea674c5b Fix a typo in a comment.
llvm-svn: 77715
2009-07-31 19:26:54 +00:00
Benjamin Kramer 8d3b57d462 Adjust unit test for the MCSection changes.
llvm-svn: 77714
2009-07-31 19:12:33 +00:00
Argyrios Kyrtzidis 260a4703a9 For a CXXOperatorCallExpr, fix the order that StmtLocResolver uses to check subexpressions.
llvm-svn: 77713
2009-07-31 19:02:11 +00:00
Dan Gohman ed4f2350cb Delete spurious semicolons.
llvm-svn: 77712
2009-07-31 18:59:29 +00:00
Benjamin Kramer 626495a031 Fix build.
llvm-svn: 77711
2009-07-31 18:58:46 +00:00
Ted Kremenek defdbdc5ca Update CMake files.
llvm-svn: 77709
2009-07-31 18:50:22 +00:00
Chris Lattner 4d2c0f9008 switch off of 'Section' onto MCSection. We're not properly using
MCSection subclasses yet, but this is a step in the right direction.

llvm-svn: 77708
2009-07-31 18:48:30 +00:00
Douglas Gregor ef4e4cca07 Make the recanonicalization-for-an-out-of-line-definition test case a bit trickier
llvm-svn: 77707
2009-07-31 18:36:42 +00:00
Dan Gohman 060ca138e2 Remove Annotation.h, which is no longer used in the LLVM tree.
llvm-svn: 77706
2009-07-31 18:36:25 +00:00
Evan Cheng be8422e8e0 Until we have a "ALIGN" pseudo instruction, have asm printer emitted a .align
to ensure the instruction that follows a TBB (when the number of table entries
is odd) is 2-byte aligned.
Patch by Sandeep Patel.

llvm-svn: 77705
2009-07-31 18:35:56 +00:00
Dan Gohman 7baae4b355 MachineFunction no longer needs Annotation.
llvm-svn: 77704
2009-07-31 18:35:51 +00:00
Douglas Gregor 1b2596ba36 Allow one to update the type representation of the declaration specifiers. Will be used by an upcoming commit.
llvm-svn: 77703
2009-07-31 18:34:30 +00:00
Douglas Gregor b9a955dc1d Remove a redundant getCanonicalType call
llvm-svn: 77702
2009-07-31 18:32:42 +00:00
Evan Cheng f6d0fa3d33 - Teach TBB / TBH offset limits are 510 and 131070 respectively since the offset
is scaled by two.
- Teach GetInstSizeInBytes about TBB and TBH.

llvm-svn: 77701
2009-07-31 18:28:05 +00:00
Chris Lattner 4b21d044a4 fix some more issues where we expected GetSection to do "get or create"
llvm-svn: 77700
2009-07-31 18:27:48 +00:00
Mike Stump bc78a728ee Add code to setup the vtable pointer in the constructor. Work in progress.
llvm-svn: 77699
2009-07-31 18:25:34 +00:00
Devang Patel fe6bbd1145 New test case for rev. 77694.
llvm-svn: 77698
2009-07-31 18:24:12 +00:00
Dan Gohman b53e26c7eb Fix printing of Alloca instructions with null operands.
llvm-svn: 77697
2009-07-31 18:23:24 +00:00
Dan Gohman dc2b1b0a1c Fix some problems with ASTCallbackVH in its use as a DenseMap key.
llvm-svn: 77696
2009-07-31 18:21:48 +00:00
Dan Gohman 0542060b8a Teach ValueHandleBase to treat DenseMap's special Empty and Tombstone
values the same way it treats null pointers. This is needed to allow
CallbackVH to be used as a key in a DenseMap.

llvm-svn: 77695
2009-07-31 18:20:18 +00:00
Devang Patel 9d7de2a155 Process DbgDeclareInst.
llvm-svn: 77694
2009-07-31 18:18:52 +00:00
Dan Gohman 40f830d08c Split DenseMapInfo into a separate header file, so that it can be
included separately.

llvm-svn: 77693
2009-07-31 18:18:19 +00:00
Daniel Dunbar ca8135379e Normalize target registration code.
llvm-svn: 77692
2009-07-31 18:16:53 +00:00
Dan Gohman 5ea74d55ce Reapply r77654 with a fix: MachineFunctionPass's getAnalysisUsage
shouldn't do AU.setPreservesCFG(), because even though CodeGen passes
don't modify the LLVM IR CFG, they may modify the MachineFunction CFG,
and passes like MachineLoop are registered with isCFGOnly set to true.

llvm-svn: 77691
2009-07-31 18:16:33 +00:00
Daniel Dunbar cd4c338437 MultiTestRunner: Fix invalid warning when pointing 'lit' directly at a test.
llvm-svn: 77690
2009-07-31 18:12:18 +00:00
Chris Lattner 0f5a6fc38b fix a bunch of failing tests now that MCContext::GetSection doesn't create sections.
llvm-svn: 77689
2009-07-31 17:47:16 +00:00