oota-llvm.git
14 years agoRenamed NVdImmFrm to N1RegModImmFrm.
Johnny Chen [Tue, 23 Mar 2010 23:09:14 +0000 (23:09 +0000)]
Renamed NVdImmFrm to N1RegModImmFrm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99344 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove if DISABLED not if not DISABLED...
Bill Wendling [Tue, 23 Mar 2010 23:09:03 +0000 (23:09 +0000)]
Remove if DISABLED not if not DISABLED...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99343 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd some accessors to callsite/callinst/invokeinst to check
Chris Lattner [Tue, 23 Mar 2010 22:59:07 +0000 (22:59 +0000)]
add some accessors to callsite/callinst/invokeinst to check
for the noinline attribute, and make the inliner refuse to
inline a call site when the call site is marked noinline even
if the callee isn't.  This fixes PR6682.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99341 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert 99335. getTypeToExpandTo's iterative behavior is actually
Dan Gohman [Tue, 23 Mar 2010 22:44:42 +0000 (22:44 +0000)]
Revert 99335. getTypeToExpandTo's iterative behavior is actually
needed here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99339 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoUse "DISABLE_EDIS" to disable building "edis" explicitly. Don't build it for
Bill Wendling [Tue, 23 Mar 2010 22:15:33 +0000 (22:15 +0000)]
Use "DISABLE_EDIS" to disable building "edis" explicitly. Don't build it for
Apple-style builds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99336 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove getTypeToExpandTo, since it isn't adding much value
Dan Gohman [Tue, 23 Mar 2010 22:15:31 +0000 (22:15 +0000)]
Remove getTypeToExpandTo, since it isn't adding much value
beyond just calling getTypeToTransformTo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99335 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agomake sure to delete the llvm module before calling llvm_shutdown,
Chris Lattner [Tue, 23 Mar 2010 21:59:43 +0000 (21:59 +0000)]
make sure to delete the llvm module before calling llvm_shutdown,
this fixes crashes in error cases, PR6683

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99334 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't back past debug info intrinsics; SCEVExpander's strategy
Dan Gohman [Tue, 23 Mar 2010 21:53:22 +0000 (21:53 +0000)]
Don't back past debug info intrinsics; SCEVExpander's strategy
for ignoring debug info intrinsics everywhere else is to advance
past them, and it needs to be consistent.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99332 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agofix an infinite loop in Module::getEndianness, PR6684
Chris Lattner [Tue, 23 Mar 2010 21:48:41 +0000 (21:48 +0000)]
fix an infinite loop in Module::getEndianness, PR6684
patch by Alex Mac!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99330 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix typo in the comment for N3VX class.
Johnny Chen [Tue, 23 Mar 2010 21:35:03 +0000 (21:35 +0000)]
Fix typo in the comment for N3VX class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99328 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd comment.
Johnny Chen [Tue, 23 Mar 2010 21:30:12 +0000 (21:30 +0000)]
Add comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99327 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd New NEON Format NVdVmVCVTFrm.
Johnny Chen [Tue, 23 Mar 2010 21:25:38 +0000 (21:25 +0000)]
Add New NEON Format NVdVmVCVTFrm.
Converted some of the NEON vcvt instructions to this format.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99326 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSkip debugging intrinsics when sinking unused invariants.
Bill Wendling [Tue, 23 Mar 2010 21:15:59 +0000 (21:15 +0000)]
Skip debugging intrinsics when sinking unused invariants.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99324 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd New NEON Format NVdVmImmFrm.
Johnny Chen [Tue, 23 Mar 2010 20:40:44 +0000 (20:40 +0000)]
Add New NEON Format NVdVmImmFrm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99322 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoIgnore dbg_value's.
Evan Cheng [Tue, 23 Mar 2010 20:36:12 +0000 (20:36 +0000)]
Ignore dbg_value's.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99321 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTeach isSafeToClobberEFLAGS to ignore dbg_value's. We need a MachineBasicBlock::itera...
Evan Cheng [Tue, 23 Mar 2010 20:35:45 +0000 (20:35 +0000)]
Teach isSafeToClobberEFLAGS to ignore dbg_value's. We need a MachineBasicBlock::iterator that does this automatically?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99320 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCode clean up.
Evan Cheng [Tue, 23 Mar 2010 20:33:48 +0000 (20:33 +0000)]
Code clean up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99319 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix VLDMQ and VSTMQ instructions to use the correct encoding and address modes.
Bob Wilson [Tue, 23 Mar 2010 18:54:46 +0000 (18:54 +0000)]
Fix VLDMQ and VSTMQ instructions to use the correct encoding and address modes.
These instructions are only needed for codegen, so I've removed all the
explicit encoding bits for now; they should be set in the same way as the for
VLDMD and VSTMD whenever we add encodings for VFP.  The use of addrmode5
requires that the instructions be custom-selected so that the number of
registers can be set in the AM5Opc value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99309 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTest case for llvm-gcc r99305. Radar 7659636.
Stuart Hastings [Tue, 23 Mar 2010 18:39:23 +0000 (18:39 +0000)]
Test case for llvm-gcc r99305.  Radar 7659636.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99306 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix bad indentation, 80-column violations, and trailing whitespace.
Bob Wilson [Tue, 23 Mar 2010 17:23:59 +0000 (17:23 +0000)]
Fix bad indentation, 80-column violations, and trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99295 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd New NEON Format NVdImmFrm.
Johnny Chen [Tue, 23 Mar 2010 16:43:47 +0000 (16:43 +0000)]
Add New NEON Format NVdImmFrm.
Ref: A7.4.6 One register and a modified immediate value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99288 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd comment.
Evan Cheng [Tue, 23 Mar 2010 15:50:49 +0000 (15:50 +0000)]
Add comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99284 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoForgot this.
Evan Cheng [Tue, 23 Mar 2010 15:49:37 +0000 (15:49 +0000)]
Forgot this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99283 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTeach simplify libcall to transform __strcpy_chk to __memcpy_chk to enable optimizati...
Evan Cheng [Tue, 23 Mar 2010 15:48:04 +0000 (15:48 +0000)]
Teach simplify libcall to transform __strcpy_chk to __memcpy_chk to enable optimizations down stream.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99282 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoadd assert in argpromotion, which cannot trigger
Gabor Greif [Tue, 23 Mar 2010 14:40:20 +0000 (14:40 +0000)]
add assert in argpromotion, which cannot trigger
if Function::hasAddressTaken works as advertised

also included some cosmetic cleanups

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99276 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoword-o
Gabor Greif [Tue, 23 Mar 2010 13:45:54 +0000 (13:45 +0000)]
word-o

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99275 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRename some instructions to match the corresponding NEON opcode.
Bob Wilson [Tue, 23 Mar 2010 06:26:18 +0000 (06:26 +0000)]
Rename some instructions to match the corresponding NEON opcode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99266 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange VST1 instructions for loading Q register values to operate on pairs
Bob Wilson [Tue, 23 Mar 2010 06:20:33 +0000 (06:20 +0000)]
Change VST1 instructions for loading Q register values to operate on pairs
of D registers.  Add a separate VST1q instruction with a Q register
source operand for use by storeRegToStackSlot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99265 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix an incorrect logic causing instcombine to miss some _chk -> non-chk transformations.
Evan Cheng [Tue, 23 Mar 2010 06:06:09 +0000 (06:06 +0000)]
Fix an incorrect logic causing instcombine to miss some _chk -> non-chk transformations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99263 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange VLD1 instructions for loading Q register values to operate on pairs
Bob Wilson [Tue, 23 Mar 2010 05:25:43 +0000 (05:25 +0000)]
Change VLD1 instructions for loading Q register values to operate on pairs
of D registers.  Add a separate VLD1q instruction with a Q register
destination operand for use by loadRegFromStackSlot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99261 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMC: Switch to using MCInst fragments to do relaxation.
Daniel Dunbar [Tue, 23 Mar 2010 05:09:03 +0000 (05:09 +0000)]
MC: Switch to using MCInst fragments to do relaxation.

Also, both MCMachOStreamer and MCAssembler are now target independent!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99256 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMC: Add TargetAsmBackend::MayNeedRelaxation, for checking whether a particular instru...
Daniel Dunbar [Tue, 23 Mar 2010 03:13:05 +0000 (03:13 +0000)]
MC: Add TargetAsmBackend::MayNeedRelaxation, for checking whether a particular instruction + fixups might need relaxation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99249 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMC: Add TargetAsmBackend::WriteNopData and use to eliminate some target dependencies...
Daniel Dunbar [Tue, 23 Mar 2010 02:36:58 +0000 (02:36 +0000)]
MC: Add TargetAsmBackend::WriteNopData and use to eliminate some target dependencies in MCMachOStreamer and MCAssembler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99248 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMC: Add TargetAsmBackend::RelaxInstruction callback, and custom X86 implementation.
Daniel Dunbar [Tue, 23 Mar 2010 01:39:09 +0000 (01:39 +0000)]
MC: Add TargetAsmBackend::RelaxInstruction callback, and custom X86 implementation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99245 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMC: Tweak MCInstFragment to include the encoded data and fixups, so that we don't...
Daniel Dunbar [Tue, 23 Mar 2010 01:39:05 +0000 (01:39 +0000)]
MC: Tweak MCInstFragment to include the encoded data and fixups, so that we don't need to recompute them during relaxation. I will revisit this once all the other pieces of fast relaxation are in place.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99244 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPut MCSectionCOFF::Name into the MCContext instead of leaking it.
Jeffrey Yasskin [Mon, 22 Mar 2010 23:26:12 +0000 (23:26 +0000)]
Put MCSectionCOFF::Name into the MCContext instead of leaking it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99231 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMC: Add MCInstFragment, not used yet.
Daniel Dunbar [Mon, 22 Mar 2010 23:16:48 +0000 (23:16 +0000)]
MC: Add MCInstFragment, not used yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99229 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a FIXME.
Daniel Dunbar [Mon, 22 Mar 2010 23:16:43 +0000 (23:16 +0000)]
Add a FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99228 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix PR6673: updating the callback should not clear the map.
Chris Lattner [Mon, 22 Mar 2010 23:15:57 +0000 (23:15 +0000)]
Fix PR6673: updating the callback should not clear the map.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99227 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoEmit DW_AT_low_pc and DW_AT_high_pc attributes for TAG_compile_unit.
Devang Patel [Mon, 22 Mar 2010 23:11:36 +0000 (23:11 +0000)]
Emit DW_AT_low_pc and DW_AT_high_pc attributes for TAG_compile_unit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99225 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix 80 col violation.
Evan Cheng [Mon, 22 Mar 2010 22:44:31 +0000 (22:44 +0000)]
Fix 80 col violation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99224 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDW_AT_stmt_list attribute attached with a compile unit encodes offset of line number...
Devang Patel [Mon, 22 Mar 2010 22:38:48 +0000 (22:38 +0000)]
DW_AT_stmt_list attribute attached with a compile unit encodes offset of line number information for this compile unit in debug_line section. This offset is always zero when only one compile unit is emitted in a object file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99223 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMC: Fix a few more cases we were passing an MCDataFragment when a MCFragment would...
Daniel Dunbar [Mon, 22 Mar 2010 21:49:41 +0000 (21:49 +0000)]
MC: Fix a few more cases we were passing an MCDataFragment when a MCFragment would do, and sprinkle in some const.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99218 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoSimplify.
Daniel Dunbar [Mon, 22 Mar 2010 21:49:38 +0000 (21:49 +0000)]
Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99217 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMCInst: Add ::dump_pretty.
Daniel Dunbar [Mon, 22 Mar 2010 21:49:34 +0000 (21:49 +0000)]
MCInst: Add ::dump_pretty.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99216 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoReduce indentation.
Evan Cheng [Mon, 22 Mar 2010 21:24:33 +0000 (21:24 +0000)]
Reduce indentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99214 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoChange intrinsic result type for void to store it as an empty list
Chris Lattner [Mon, 22 Mar 2010 20:56:36 +0000 (20:56 +0000)]
Change intrinsic result type for void to store it as an empty list
instead of as a single element list with VoidTy.  Now with a fix
for the verifier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99206 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMC: Change MCObjectWriter::RecordRelocation to take an MCFragment (instead of a MCDat...
Daniel Dunbar [Mon, 22 Mar 2010 20:35:50 +0000 (20:35 +0000)]
MC: Change MCObjectWriter::RecordRelocation to take an MCFragment (instead of a MCDataFragment). Object files should only need the generic MCFragment features.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99205 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMC/Mach-O: Factor out getOrCreateDataFragment().
Daniel Dunbar [Mon, 22 Mar 2010 20:35:46 +0000 (20:35 +0000)]
MC/Mach-O: Factor out getOrCreateDataFragment().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99204 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMC: Eliminate MCFragment::getMaxFileSize.
Daniel Dunbar [Mon, 22 Mar 2010 20:35:43 +0000 (20:35 +0000)]
MC: Eliminate MCFragment::getMaxFileSize.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99203 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMC: Share the MCAsmLayout object, although its still not used for anything important.
Daniel Dunbar [Mon, 22 Mar 2010 20:35:35 +0000 (20:35 +0000)]
MC: Share the MCAsmLayout object, although its still not used for anything important.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99202 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRename one more NEON instruction that I missed earlier.
Bob Wilson [Mon, 22 Mar 2010 20:31:39 +0000 (20:31 +0000)]
Rename one more NEON instruction that I missed earlier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99201 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix a memory leak from DIE::addSiblingOffset() by adding the DIEValue
Jeffrey Yasskin [Mon, 22 Mar 2010 18:47:14 +0000 (18:47 +0000)]
Fix a memory leak from DIE::addSiblingOffset() by adding the DIEValue
it allocates to DwarfDebug::DIEValues.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99196 91177308-0d34-0410-b5e6-96231b3b80d8

14 years ago80 col violation.
Evan Cheng [Mon, 22 Mar 2010 18:40:50 +0000 (18:40 +0000)]
80 col violation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99195 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRegroup some instructions. No functional change.
Bob Wilson [Mon, 22 Mar 2010 18:22:06 +0000 (18:22 +0000)]
Regroup some instructions.  No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99192 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRename some VLD1/VST1 instructions to match the implementation, i.e., the
Bob Wilson [Mon, 22 Mar 2010 18:13:18 +0000 (18:13 +0000)]
Rename some VLD1/VST1 instructions to match the implementation, i.e., the
corresponding NEON instructions, instead of operation they are currently
used for.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99189 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRemove some redundant instruction classes.
Bob Wilson [Mon, 22 Mar 2010 18:02:38 +0000 (18:02 +0000)]
Remove some redundant instruction classes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99187 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agollc doesn't need LinkAllVMCore.
Dan Gohman [Mon, 22 Mar 2010 16:59:44 +0000 (16:59 +0000)]
llc doesn't need LinkAllVMCore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99186 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRefactor instruction encoding arguments for VLDnLN/VSTnLN classes to
Bob Wilson [Mon, 22 Mar 2010 16:43:10 +0000 (16:43 +0000)]
Refactor instruction encoding arguments for VLDnLN/VSTnLN classes to
specify encoding bits in arguments instead of "let" expressions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99185 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoCompletely remove Blackfin patterns that thought JustCC was i1.
Jakob Stoklund Olesen [Mon, 22 Mar 2010 16:30:04 +0000 (16:30 +0000)]
Completely remove Blackfin patterns that thought JustCC was i1.

Thanks, Chris!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99183 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoDon't leak a MachineInstruction from Thumb1InstrInfo::restoreCalleeSavedRegisters.
Jeffrey Yasskin [Mon, 22 Mar 2010 16:13:21 +0000 (16:13 +0000)]
Don't leak a MachineInstruction from Thumb1InstrInfo::restoreCalleeSavedRegisters.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99182 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAvoid leaking the FunctionPassManager from opt.
Jeffrey Yasskin [Mon, 22 Mar 2010 15:56:04 +0000 (15:56 +0000)]
Avoid leaking the FunctionPassManager from opt.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99180 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agobacking out r99170 because it still fails on clang-x86_64-darwin10-fnt
Gabor Greif [Mon, 22 Mar 2010 09:11:00 +0000 (09:11 +0000)]
backing out r99170 because it still fails on clang-x86_64-darwin10-fnt

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99171 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoNow that hopefully all direct accesses to InvokeInst operands are fixed
Gabor Greif [Mon, 22 Mar 2010 08:28:00 +0000 (08:28 +0000)]
Now that hopefully all direct accesses to InvokeInst operands are fixed
we can reapply the InvokeInst operand reordering patch. (see r98957).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99170 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFree all Constants in ~LLVMConstantImpl. We avoid assertion failures
Jeffrey Yasskin [Mon, 22 Mar 2010 05:23:37 +0000 (05:23 +0000)]
Free all Constants in ~LLVMConstantImpl.  We avoid assertion failures
by dropping all references from all constants that can use other
constants before trying to destroy any of them.

I also had to free bugpoint's Module in ~BugDriver().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99160 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix the ocaml kaleidoscope tutorial to fix linking external libraries.
Erick Tryzelaar [Sun, 21 Mar 2010 23:15:13 +0000 (23:15 +0000)]
Fix the ocaml kaleidoscope tutorial to fix linking external libraries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99151 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agomodernize the do-all-for-me target to run lit
Gabor Greif [Sun, 21 Mar 2010 22:23:02 +0000 (22:23 +0000)]
modernize the do-all-for-me target to run lit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99148 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRe-add the Metadata.h include to LLVMContextImpl.h so that MDNode is complete
Jeffrey Yasskin [Sun, 21 Mar 2010 22:08:41 +0000 (22:08 +0000)]
Re-add the Metadata.h include to LLVMContextImpl.h so that MDNode is complete
where FoldingSet<MDNode> is instantiated.  Clang and MSVC complain; gcc
doesn't.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99147 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMove the LLVMContextImpl implementation into a .cpp file.
Jeffrey Yasskin [Sun, 21 Mar 2010 21:17:34 +0000 (21:17 +0000)]
Move the LLVMContextImpl implementation into a .cpp file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99146 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMemoize InlineAsms into the LLVMContext and delete them on shutdown.
Jeffrey Yasskin [Sun, 21 Mar 2010 20:37:19 +0000 (20:37 +0000)]
Memoize InlineAsms into the LLVMContext and delete them on shutdown.
Fixes PR803.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99143 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoXFAIL tests from LLVMC on valgrind or valgrind+leak-checking. We
Jeffrey Yasskin [Sun, 21 Mar 2010 08:12:46 +0000 (08:12 +0000)]
XFAIL tests from LLVMC on valgrind or valgrind+leak-checking.  We
don't care about leaks from tblgen, and I assume we don't care about
valgrind errors in llvm-gcc/g++.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99115 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFree SavedLI even if SimpleRegisterCoalescing::JoinCopy() returns early.
Jeffrey Yasskin [Sun, 21 Mar 2010 01:47:49 +0000 (01:47 +0000)]
Free SavedLI even if SimpleRegisterCoalescing::JoinCopy() returns early.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99113 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoWhen we don't pass --vg-leak to lit, pass --leak-check=no to valgrind.
Jeffrey Yasskin [Sun, 21 Mar 2010 01:47:33 +0000 (01:47 +0000)]
When we don't pass --vg-leak to lit, pass --leak-check=no to valgrind.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99112 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix suggested parentheses warning.
Daniel Dunbar [Sun, 21 Mar 2010 01:38:21 +0000 (01:38 +0000)]
Fix suggested parentheses warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99111 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd support for XFAILing valgrind runs with memory leak checking independently
Jeffrey Yasskin [Sat, 20 Mar 2010 23:08:45 +0000 (23:08 +0000)]
Add support for XFAILing valgrind runs with memory leak checking independently
of runs without leak checking.  We add -vg to the triple for non-checked runs,
or -vg_leak for checked runs.  Also use this to XFAIL the TableGen tests, since
tablegen leaks like a sieve.  This includes some valgrindArgs refactoring.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99103 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMC/X86: Fix an MCOperand link, when we parsing shrld $1,%eax and friends; I believe...
Daniel Dunbar [Sat, 20 Mar 2010 22:36:38 +0000 (22:36 +0000)]
MC/X86: Fix an MCOperand link, when we parsing shrld $1,%eax and friends; I believe this fixes the last memory leaks under test/MC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99102 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agollvm-mc: Fix MCInstPrinter memory leaks.
Daniel Dunbar [Sat, 20 Mar 2010 22:36:35 +0000 (22:36 +0000)]
llvm-mc: Fix MCInstPrinter memory leaks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99101 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMC/Mach-O: Remove Darwin host specific tests, we don't need them anymore.
Daniel Dunbar [Sat, 20 Mar 2010 22:36:32 +0000 (22:36 +0000)]
MC/Mach-O: Remove Darwin host specific tests, we don't need them anymore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99100 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoMC/Mach-O: Tweak optimal_nop test to be host independent.
Daniel Dunbar [Sat, 20 Mar 2010 22:36:29 +0000 (22:36 +0000)]
MC/Mach-O: Tweak optimal_nop test to be host independent.
 - This also avoids us running valgrind on /usr/bin/as, which has leaks. :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99099 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agollvm-mc: Fix memory leak of MCAsmInfo.
Daniel Dunbar [Sat, 20 Mar 2010 22:36:25 +0000 (22:36 +0000)]
llvm-mc: Fix memory leak of MCAsmInfo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99098 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTargetRegistry: Fix create{AsmInfo,MCDisassembler} to return non-const objects.
Daniel Dunbar [Sat, 20 Mar 2010 22:36:22 +0000 (22:36 +0000)]
TargetRegistry: Fix create{AsmInfo,MCDisassembler} to return non-const objects.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99097 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agopr6652: Use LDM to restore PC to the return address on ARMv4.
Bob Wilson [Sat, 20 Mar 2010 22:20:40 +0000 (22:20 +0000)]
pr6652: Use LDM to restore PC to the return address on ARMv4.
Patch by John Tytgat!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99096 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRe-commit r98683 ("remove redundant writeback flag from ARM address mode 6")
Bob Wilson [Sat, 20 Mar 2010 22:13:40 +0000 (22:13 +0000)]
Re-commit r98683 ("remove redundant writeback flag from ARM address mode 6")
with changes to add a separate optional register update argument.  Change all
the NEON instructions with address register writeback to use it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99095 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd instruction variants for VST2, VST3, and VST4 "store-lane" operations with
Bob Wilson [Sat, 20 Mar 2010 21:57:36 +0000 (21:57 +0000)]
Add instruction variants for VST2, VST3, and VST4 "store-lane" operations with
address register writeback.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99094 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd variants of VST2, VST3 and VST4 with address register writeback, and
Bob Wilson [Sat, 20 Mar 2010 21:45:18 +0000 (21:45 +0000)]
Add variants of VST2, VST3 and VST4 with address register writeback, and
rewrite the existing VST3 and VST4 instructions to use the same classes as
the others.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99093 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd instructions for double-spaced VST3 and VST4 without address register
Bob Wilson [Sat, 20 Mar 2010 21:15:48 +0000 (21:15 +0000)]
Add instructions for double-spaced VST3 and VST4 without address register
writeback, and refactor the existing double-spaced VST2 instructions.
These are only for the disassembler since codegen doesn't use them, at
least for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99090 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agotests: Mangle '-vg' onto the end of the triple when running under valgrind, so
Daniel Dunbar [Sat, 20 Mar 2010 21:12:48 +0000 (21:12 +0000)]
tests: Mangle '-vg' onto the end of the triple when running under valgrind, so
we can use the standard XFAIL and XTARGET to conditional tests based on
valgrind.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99088 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd a setCalledFunction member to InvokeInst (like in CallInst)
Gabor Greif [Sat, 20 Mar 2010 21:00:25 +0000 (21:00 +0000)]
Add a setCalledFunction member to InvokeInst (like in CallInst)
and use this (as well as getCalledValue) to access the callee,
instead of {g|s}etOperand(0).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99084 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd VST1 instructions with address register writeback.
Bob Wilson [Sat, 20 Mar 2010 20:54:36 +0000 (20:54 +0000)]
Add VST1 instructions with address register writeback.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99083 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd instruction variants for VLD2, VLD3, and VLD4 "load-lane" operations with
Bob Wilson [Sat, 20 Mar 2010 20:47:18 +0000 (20:47 +0000)]
Add instruction variants for VLD2, VLD3, and VLD4 "load-lane" operations with
address register writeback.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99082 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTidy some more comments and whitespace.
Bob Wilson [Sat, 20 Mar 2010 20:39:53 +0000 (20:39 +0000)]
Tidy some more comments and whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99081 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd variants of VLD2, VLD3 and VLD4 with address register writeback, and
Bob Wilson [Sat, 20 Mar 2010 20:10:51 +0000 (20:10 +0000)]
Add variants of VLD2, VLD3 and VLD4 with address register writeback, and
rewrite the existing VLD3 and VLD4 instructions to use the same classes as
the others.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99080 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoTidy some comments and whitespace for consistency.
Bob Wilson [Sat, 20 Mar 2010 19:57:03 +0000 (19:57 +0000)]
Tidy some comments and whitespace for consistency.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99078 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRename some instructions for consistency and sanity: use "_UPD" suffix for
Bob Wilson [Sat, 20 Mar 2010 18:35:24 +0000 (18:35 +0000)]
Rename some instructions for consistency and sanity: use "_UPD" suffix for
load/stores with address register writeback, and use "odd" suffix to distinguish
instructions to access odd numbered registers (instead of "a" and "b").
No functional changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99066 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd instructions for double-spaced VLD3 and VLD4 without address register
Bob Wilson [Sat, 20 Mar 2010 18:14:26 +0000 (18:14 +0000)]
Add instructions for double-spaced VLD3 and VLD4 without address register
writeback, and refactor the existing double-spaced VLD2 instructions.
These are only for the disassembler since codegen doesn't use them, at
least for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99065 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoAdd VLD1 instructions with address register writeback.
Bob Wilson [Sat, 20 Mar 2010 17:59:03 +0000 (17:59 +0000)]
Add VLD1 instructions with address register writeback.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99062 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoPIC16: Simplify code by using a std::set<std::string> instead of a sorted & uniqued...
Benjamin Kramer [Sat, 20 Mar 2010 17:41:18 +0000 (17:41 +0000)]
PIC16: Simplify code by using a std::set<std::string> instead of a sorted & uniqued std::list of leaked char*.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99061 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoRevert the rest of 98679.
Bob Wilson [Sat, 20 Mar 2010 06:34:02 +0000 (06:34 +0000)]
Revert the rest of 98679.
--- Reverse-merging r98679 into 'lib/Target/ARM/ARMInstrVFP.td':
U    lib/Target/ARM/ARMInstrVFP.td

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99049 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoFix a very bad typo. Since the register number was off by one, the ARM
Bob Wilson [Sat, 20 Mar 2010 06:05:13 +0000 (06:05 +0000)]
Fix a very bad typo.  Since the register number was off by one, the ARM
load/store optimizer would incorrectly think that registers D26 and D28
were consecutive and would generate a VLDM instruction to load them.
The assembler was not convinced.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99043 91177308-0d34-0410-b5e6-96231b3b80d8

14 years agoClear the SCEVExpander's insertion point after making deletions,
Dan Gohman [Sat, 20 Mar 2010 03:53:53 +0000 (03:53 +0000)]
Clear the SCEVExpander's insertion point after making deletions,
so that the SCEVExpander doesn't retain a dangling pointer as its
insert position. The dangling pointer in this case wasn't ever used
to insert new instructions, but it was causing trouble with
SCEVExpander's code for automatically advancing its insert position
past debug intrinsics.

This fixes use-after-free errors that valgrind noticed in
test/Transforms/IndVarSimplify/2007-06-06-DeleteDanglesPtr.ll and
test/Transforms/IndVarSimplify/exit_value_tests.ll.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99036 91177308-0d34-0410-b5e6-96231b3b80d8