Commit Graph

50360 Commits

Author SHA1 Message Date
Benjamin Kramer
c6ca847a4e Use abs64 instead abs; some platforms don't have a 64-bit abs overload. Noticed by Yonggang Luo!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78543 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-09 22:37:07 +00:00
Evan Cheng
a56c57e5f0 Add support to convert 32-bit instructions to 16-bit non-two-address ones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78540 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-09 19:17:19 +00:00
Chris Lattner
1f8e8db8fc always end a section with \n on elf.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78534 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-09 15:31:10 +00:00
Daniel Dunbar
db2ddb5dc5 llvm-mc/AsmParser: Fix thinko in ClassInfo::operator<.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78533 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-09 08:23:23 +00:00
Daniel Dunbar
72fa87f0cf llvm-mc/AsmParser: Add hack to ignore Int_* and *_Int instructions for now, to
make it easier to see interesting ambiguities.
 - Also, check that user doesn't try to redefine the super class. This is a wart
   in the current design, in that assembler match classes aren't explicitly
   declared somewhere (so there isn't a unique place to declare the super
   class). This should probably be fixed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78532 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-09 08:19:00 +00:00
Daniel Dunbar
a62b02a7ef Disable this test for now, we don't check for super classes when matching yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78531 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-09 07:35:56 +00:00
Daniel Dunbar
5fe6338ac8 llvm-mc/AsmParser: Implement user defined super classes.
- We can now discriminate SUB32ri8 from SUB32ri, for example.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78530 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-09 07:20:21 +00:00
Bob Wilson
22cd2547fe Add tests for Neon VZIP and VUZP instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78529 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-09 06:48:29 +00:00
Bob Wilson
4861fd5d0c Add a test for Neon VTRN instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78528 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-09 06:30:46 +00:00
Daniel Dunbar
2b54481a77 llvm-mc/AsmParser: Separate instruction ordering for ambiguity detection.
- We want the ordering operation to be simple, since we run it on every
   match. The old ordering is also not a strict weak ordering when there are
   ambiguities, which makes MSVC unhappy.

 - While we are at it, detect all ambiguities instead of just the adjacent
   ones. There are actually 655, for X86.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78526 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-09 06:05:33 +00:00
Bob Wilson
1ff446fef6 Change Neon table lookup (VTBL) and table extension (VTBX) intrinsics to
take the table vectors as separate arguments, instead of the previous
approach where they were combined into one big vector.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78525 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-09 06:03:09 +00:00
Daniel Dunbar
98164afb01 Extend comment on ParserMatchClass .td field, and add some missing
classes for X86.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78524 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-09 06:00:04 +00:00
Daniel Dunbar
6745d42e8e llvm-mc/AsmParser: Define match classes in the .td file.
-2 FIXMEs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78523 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-09 05:18:30 +00:00
Daniel Dunbar
606e8ad796 llvm-mc/AsmParser: Sketch infrastructure for ordering instructions & detecting
ambiguities.
 - Currently there are 483 ambiguities to resolve. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78522 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-09 04:00:06 +00:00
Daniel Dunbar
094da67bd7 STLExtras: Add less_ptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78521 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-09 03:36:59 +00:00
Chris Lattner
8246bef02a fix edito
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78520 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 23:43:55 +00:00
Daniel Dunbar
af3e9d43a2 llvm-mc/AsmMatcher: Tweak string matcher (missed a newline).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78518 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 23:43:16 +00:00
Chris Lattner
93b6db3de9 sink the 'name' and 'isdirective' state out of MCSection into its derived classes.
This totally optimizes PIC16 sections by not having an 'isdirective' bit anymore!! ;-)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78517 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 23:39:42 +00:00
Anton Korobeynikov
8e9ece75db Use subclassing to print lane-like immediates (w/o hash) eliminating
'no_hash' modifier. Hopefully this will make Daniel happy :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78514 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 23:10:41 +00:00
Daniel Dunbar
72ffae90ce llvm-mc/AsmMatcher: Tweak string matcher.
- Track whether we need to insert an explicit 'break'.

 - Invert conditional when matching a single prefix to reduce
   nesting/bracing/breaking.

 - wc -l of X86GenAsmMatcher.inc decreased by 10%. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78513 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 22:57:25 +00:00
Chris Lattner
76eb6f5685 remove nondeterminstic test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78512 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 22:56:37 +00:00
Chris Lattner
ba44633a3b add a note about dead zero extends.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78511 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 22:46:59 +00:00
Chris Lattner
892e182393 1. Make MCSection an abstract class.
2. Move section switch printing to MCSection virtual method which takes a
   TAI.  This eliminates textual formatting stuff from TLOF.
3. Eliminate SwitchToSectionDirective, getSectionFlagsAsString, and 
   TLOFELF::AtIsCommentChar.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78510 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 22:41:53 +00:00
Chris Lattner
0aac30195c switch this to create coff sections for now, it doesn't really matter for
llvm-mc's purpose yet and we'll want to switch to creating semantic sections
at some point.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78509 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 22:38:48 +00:00
Eric Christopher
b4dc13cab7 Add crc32 instruction and intrinsics. Add a new class of prefix
bytes for F2 0F 38 and propagate. Add a FIXME for a set
of possibilities which correspond to intrinsics already used.

New test.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78508 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 21:55:08 +00:00
Jakob Stoklund Olesen
46151de6a0 Add support for READCYCLECOUNTER in Blackfin back-end.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78506 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 21:42:22 +00:00
Chris Lattner
f7427e558d add new PIC16Section class, this time hopefully not breaking the build :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78505 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 21:37:01 +00:00
Daniel Dunbar
245f05843f llvm-mc/AsmMatcher: Switch token matching to use the new string matcher.
Also, redefined MatchRegisterName to just return the register value or a
sentinel, to simplify the generated code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78504 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 21:22:41 +00:00
Daniel Dunbar
fb373909be Revert r78501, it doesn't build.
--- Reverse-merging r78501 into '.':
U    lib/Target/PIC16/PIC16TargetObjectFile.cpp
D    lib/Target/PIC16/PIC16Section.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78503 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 21:12:40 +00:00
Chris Lattner
50e38121d1 make PIC16 create its own custom MCSection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78501 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 20:55:25 +00:00
Chris Lattner
7c599d056a make target-specific TLOF impls (except PIC16) create target-specific
MCSection instances.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78500 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 20:52:13 +00:00
Chris Lattner
a1c31b779c stub out PECOFF/MachO/ELF MCSection classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78499 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 20:50:49 +00:00
Chris Lattner
5277b22687 eliminate TargetLoweringObjectFileSparc in favor of a TAI hook.
A TAI hook is appropriate in this case because this is just an
asm syntax issue, not a semantic difference. TLOF should model
the semantics of the section.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78498 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 20:43:12 +00:00
Jakob Stoklund Olesen
17421d81fd Don't build illegal ops in DAGCombiner::SimplifyBinOpWithSameOpcodeHands().
Blackfin supports and/or/xor on i32 but not on i16. Teach
DAGCombiner::SimplifyBinOpWithSameOpcodeHands to not produce illegal nodes
after legalize ops.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78497 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 20:42:17 +00:00
Chris Lattner
9aee18186c give pic16 a target-specific section creation name too
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78496 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 20:23:47 +00:00
Chris Lattner
0c0cb71233 now that getOrCreateSection is all object-file specific,
give the impls an object-file-specific name.  In the future
they can take different arguments etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78495 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 20:22:20 +00:00
Chris Lattner
fbf1d271e6 sink getOrCreateSection down into all the object file implementations,
now that they create *all* the sections.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78494 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 20:14:13 +00:00
Eric Christopher
d34ab83c16 Fix some cut and paste-os.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78493 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 20:09:33 +00:00
Chris Lattner
70add884e4 add a little function to do arbitrary string pattern matching in a
much more efficient way than a sequence of if's.  Switch MatchRegisterName
to use it.  It would be nice if someone could factor this out to a shared
place in tblgen :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78492 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 20:02:57 +00:00
Chris Lattner
d39bd3aa5c add another const
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78487 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 19:16:05 +00:00
Chris Lattner
c604953460 remove a useless anon-ns, make table const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78486 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 19:15:25 +00:00
Daniel Dunbar
c43782cf71 Some ProfileInfo cleanups.
- Part of optimal static profiling patch sequence by Andreas Neustifter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78485 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 18:59:03 +00:00
Daniel Dunbar
55e354ac0e Add a basic static ProfileInfo provider (ProfileEstimatorPass).
- Part of optimal static profiling patch sequence by Andreas Neustifter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78484 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 18:44:18 +00:00
Eric Christopher
63cd7e557c Define intrinsics for crc instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78482 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 18:07:59 +00:00
Bruno Cardoso Lopes
71435a3975 Use reloc_absolute_word_sext relocation for X86::MOV64(ri/mi)32 instructions,
since they are in 64 bit mode with i64immSExt32 imms. JIT is not affected since 
it handles both word absolute relocations in the same way


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78479 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 17:47:41 +00:00
Daniel Dunbar
caaa49336b More ProfileInfo improvements.
- Part of optimal static profiling patch sequence by Andreas Neustifter.

 - Store edge, block, and function information separately for each functions
   (instead of in one giant map).

 - Return frequencies as double instead of int, and use a sentinel value for
   missing information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78477 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 17:43:09 +00:00
Bruno Cardoso Lopes
3e0094d969 ELF improvements:
Handle large integers, x86_fp80, ConstantAggregateZero, and two more ConstantExpr:
GetElementPtr and IntToPtr
Set SHF_MERGE bit for mergeable strings
Avoid zero initialized strings to be classified as a bss symbol
Don't allow common symbols to be classified as STB_WEAK
Add a constant to be used as a global value offset in data relocations 



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78476 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 17:29:04 +00:00
Daniel Dunbar
cf1e764a1c Update CMake
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78475 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 17:03:13 +00:00
Jakob Stoklund Olesen
6349668fca Clean out per-function data after the machine code verifier is done with it.
Also don't dereference old pointers after they have been deleted causing
random crashes when enabling the machine code verifier.

Ahem...

I have not included a test case for the crash. It hapened when enabling the
verifier on CodeGen/X86/2009-08-06-branchfolder-crash.ll.

The crash depends on an MBB being allocated at the same address as a
previously deleted MBB. I don't think that can be reproduced reliably.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78472 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 15:34:50 +00:00
Anton Korobeynikov
06af2ba809 Add insert_elt / extract_elt patterns for v4f32 stuff.
Did anyone tests v4f32 ever?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78470 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-08 14:06:07 +00:00