Commit Graph

37247 Commits

Author SHA1 Message Date
Johnny Chen
7d85ac09f8 Reverted r99376. The disassembler will deal with the 2-reg format of these two
N3VX instructions using special case code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99409 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24 18:46:34 +00:00
Jim Grosbach
35075a7e81 tweak the arm if conversion heuristic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99402 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24 16:15:14 +00:00
Torok Edwin
15417383b9 Fix memory leak in liveintervals: the destructor for VNInfos must be called,
otherwise the SmallVector it contains doesn't free its memory.
In most cases LiveIntervalAnalysis could get away by not calling the destructor,
because VNInfos are bumpptr-allocated, and smallvectors usually don't grow.
However when the SmallVector does grow it always leaks.

This is the valgrind shown leak from the original testcase:
==8206== 18,304 bytes in 151 blocks are definitely lost in loss record 164 of 164
==8206==    at 0x4A079C7: operator new(unsigned long) (vg_replace_malloc.c:220)
==8206==    by 0x4DB7A7E: llvm::SmallVectorBase::grow_pod(unsigned long, unsigned long) (in /home/edwin/clam/git/builds/defaul
t/libclamav/.libs/libclamav.so.6.1.0)
==8206==    by 0x4F90382: llvm::VNInfo::addKill(llvm::SlotIndex) (in /home/edwin/clam/git/builds/default/libclamav/.libs/libcl
amav.so.6.1.0)
==8206==    by 0x5126B5C: llvm::LiveIntervals::handleVirtualRegisterDef(llvm::MachineBasicBlock*, llvm::ilist_iterator<llvm::M
achineInstr>, llvm::SlotIndex, llvm::MachineOperand&, unsigned int, llvm::LiveInterval&) (in /home/edwin/clam/git/builds/defau
lt/libclamav/.libs/libclamav.so.6.1.0)
==8206==    by 0x512725E: llvm::LiveIntervals::handleRegisterDef(llvm::MachineBasicBlock*, llvm::ilist_iterator<llvm::MachineI
nstr>, llvm::SlotIndex, llvm::MachineOperand&, unsigned int) (in /home/edwin/clam/git/builds/default/libclamav/.libs/libclamav
.so.6.1.0)
==8206==    by 0x51278A8: llvm::LiveIntervals::computeIntervals() (in /home/edwin/clam/git/builds/default/libclamav/.libs/libc
lamav.so.6.1.0)
==8206==    by 0x5127CB4: llvm::LiveIntervals::runOnMachineFunction(llvm::MachineFunction&) (in /home/edwin/clam/git/builds/de
fault/libclamav/.libs/libclamav.so.6.1.0)
==8206==    by 0x4DAE935: llvm::FPPassManager::runOnFunction(llvm::Function&) (in /home/edwin/clam/git/builds/default/libclama
v/.libs/libclamav.so.6.1.0)
==8206==    by 0x4DAEB10: llvm::FunctionPassManagerImpl::run(llvm::Function&) (in /home/edwin/clam/git/builds/default/libclama
v/.libs/libclamav.so.6.1.0)
==8206==    by 0x4DAED3D: llvm::FunctionPassManager::run(llvm::Function&) (in /home/edwin/clam/git/builds/default/libclamav/.l
ibs/libclamav.so.6.1.0)
==8206==    by 0x4D8BE8E: llvm::JIT::runJITOnFunctionUnlocked(llvm::Function*, llvm::MutexGuard const&) (in /home/edwin/clam/git/builds/default/libclamav/.libs/libclamav.so.6.1.0)
==8206==    by 0x4D8CA72: llvm::JIT::getPointerToFunction(llvm::Function*) (in /home/edwin/clam/git/builds/default/libclamav/.libs/libclamav.so.6.1.0)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99400 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24 13:50:36 +00:00
Gabor Greif
c9f7500d17 Finally land the InvokeInst operand reordering.
I have audited all getOperandNo calls now, fixing
hidden assumptions. CallSite related uglyness will
be eliminated successively.

Note this patch has a long and griveous history,
for all the back-and-forths have a look at
CallSite.h's log.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99399 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24 13:21:49 +00:00
Gabor Greif
6d6aaeca4f tighten a type and remove trailing whitespace, no functional changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99398 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24 11:58:07 +00:00
Gabor Greif
bd1f99341e increase const goodness and remove pointless getUser() calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99395 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24 10:29:52 +00:00
Gabor Greif
5eff285d8d cache result of UI.getOperandNo() instead of calling it twice, it is cheaper this way
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99394 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24 10:12:54 +00:00
Duncan Sands
bbdca3f68e Fix comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99392 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24 09:05:14 +00:00
Daniel Dunbar
207e06ea04 MC: Direct all {fragment,section,symbol} address access through the MCAsmLayout object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99380 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24 03:43:40 +00:00
Evan Cheng
2250425d6e dbg_value may end a block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99378 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24 01:50:28 +00:00
Johnny Chen
b7ba5781e6 Mark VMOVDneon and VMOVQ as having the N2RegFrm form to help the disassembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99376 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24 01:29:25 +00:00
Chris Lattner
c54a2f150d Switch INC8r to defining its pattern in terms of X86inc_flag
and defining the add pattern with Pat<>, eliminating a use of
parallel.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99375 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24 01:02:12 +00:00
Johnny Chen
c5f413a74c Renamed NVdVmImmFrm and NVdVmVCVTFrm to the more proper N2RegFrm and NVCVTFrm,
respectively, and add some more comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99373 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24 00:57:50 +00:00
Dan Gohman
0f920e55fc Remove the ConvertActions table and associated code, which is unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99372 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24 00:53:38 +00:00
Chris Lattner
1aec4d7596 switch SDTBinaryArithWithFlags to be a multiple-result node as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99370 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24 00:49:29 +00:00
Chris Lattner
74c8d67af8 Switch SDTUnaryArithWithFlags to being modeled as a two-result
ISD node.  The only change in the generated isel code are comments
like:

<                 // Src: (X86dec_flag:i16 GR16:i16:$src)
---
>                 // Src: (X86dec_flag:i16:i32 GR16:i16:$src)

because now it knows that X86dec_flag returns both an i16 (for the result)
and an i32 (for EFLAGS) in this case.  Wewt.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99369 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24 00:47:47 +00:00
Chris Lattner
7e504141e0 remove 64-bit or_is_add parallels.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99360 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24 00:16:52 +00:00
Chris Lattner
a0f7017752 remove useless or_is_add parallel's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99359 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24 00:15:23 +00:00
Chris Lattner
fdac0b66f0 reduce nesting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99358 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24 00:12:57 +00:00
Jim Grosbach
fceabef52c try being more permissive for if-conversion on ARM V7. see what the nightly
test run permformance numbers say as to whether it helps.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99355 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24 00:03:13 +00:00
Jakob Stoklund Olesen
fe4b92baf1 Revert "Add a late SSEDomainFix pass that twiddles SSE instructions to avoid domain crossings."
This reverts commit 99345. It was breaking buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99352 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-23 23:48:51 +00:00
Daniel Dunbar
ff54784683 MC: Sprinkle in some more interesting statistics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99350 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-23 23:47:14 +00:00
Daniel Dunbar
ef6e96f91f llvm-mc: Fast path EvaluateAbsolute of constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99348 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-23 23:47:07 +00:00
Chris Lattner
ae8f4c4f86 [llvm_void_ty] is no longer needed for result types,
just use an empty result list.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99346 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-23 23:46:07 +00:00
Jakob Stoklund Olesen
c75c5fa125 Add a late SSEDomainFix pass that twiddles SSE instructions to avoid domain crossings.
This is work in progress. So far, SSE execution domain tables are added to
X86InstrInfo, and a skeleton pass is enabled with -sse-domain-fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99345 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-23 23:14:44 +00:00
Johnny Chen
a271174771 Renamed NVdImmFrm to N1RegModImmFrm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99344 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-23 23:09:14 +00:00
Chris Lattner
a54934ae9d 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
2010-03-23 22:59:07 +00:00
Dan Gohman
bc7a902713 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
2010-03-23 22:44:42 +00:00
Dan Gohman
349074896f 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
2010-03-23 22:15:31 +00:00
Dan Gohman
e059ee832c 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
2010-03-23 21:53:22 +00:00
Chris Lattner
a495c7232d 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
2010-03-23 21:48:41 +00:00
Johnny Chen
841e828702 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
2010-03-23 21:35:03 +00:00
Johnny Chen
be7849ee73 Add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99327 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-23 21:30:12 +00:00
Johnny Chen
3ae9a57c74 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
2010-03-23 21:25:38 +00:00
Bill Wendling
87a10f5b2f Skip debugging intrinsics when sinking unused invariants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99324 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-23 21:15:59 +00:00
Johnny Chen
927b88f771 Add New NEON Format NVdVmImmFrm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99322 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-23 20:40:44 +00:00
Evan Cheng
f1250eeadf Ignore dbg_value's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99321 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-23 20:36:12 +00:00
Evan Cheng
8d1f0dd983 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
2010-03-23 20:35:45 +00:00
Evan Cheng
112e5e7eff Code clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99319 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-23 20:33:48 +00:00
Bob Wilson
df9a4f0591 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
2010-03-23 18:54:46 +00:00
Bob Wilson
011355944b 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
2010-03-23 17:23:59 +00:00
Johnny Chen
785516adc5 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
2010-03-23 16:43:47 +00:00
Evan Cheng
0289b419a4 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
2010-03-23 15:48:04 +00:00
Gabor Greif
0054c7a867 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
2010-03-23 14:40:20 +00:00
Gabor Greif
050560e535 word-o
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99275 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-23 13:45:54 +00:00
Bob Wilson
c289a0252b 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
2010-03-23 06:26:18 +00:00
Bob Wilson
11d9899759 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
2010-03-23 06:20:33 +00:00
Evan Cheng
9d8f002d8f 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
2010-03-23 06:06:09 +00:00
Bob Wilson
621f195243 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
2010-03-23 05:25:43 +00:00
Daniel Dunbar
d8036fb0de 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
2010-03-23 05:09:03 +00:00