Commit Graph

13768 Commits

Author SHA1 Message Date
Rafael Espindola 258a605fce Add r127409 back now that the windows file was updated.
llvm-svn: 127417
2011-03-10 18:33:29 +00:00
Jakob Stoklund Olesen e413d9d341 Revert r127409 which broke all the Windows bots.
llvm-svn: 127413
2011-03-10 18:01:43 +00:00
Rafael Espindola ea5a137e55 Add support for MemoryBuffers that are not null terminated and add
support for creating buffers that cover only a part of a file.

llvm-svn: 127409
2011-03-10 16:10:30 +00:00
Che-Liang Chiou 6e9fb0d056 ptx: add the rest of special registers of ISA version 2.0
llvm-svn: 127397
2011-03-10 04:05:57 +00:00
Jakob Stoklund Olesen c6cc485051 Make SpillIs an optional pointer. Avoid creating a bunch of temporary SmallVectors.
llvm-svn: 127388
2011-03-10 01:21:58 +00:00
Devang Patel fa31d38aad Introduce DebugInfoProbe. This is used to monitor how llvm optimizer is treating debugging information.
It generates output that lools like

8 times line number info lost by Scalar Replacement of Aggregates (SSAUp) 
1 times line number info lost by Simplify well-known library calls 
12 times variable info lost by Jump Threading

llvm-svn: 127381
2011-03-10 00:21:25 +00:00
Evan Cheng b4c6a34415 Re-commit 127368 and 127371. They are exonerated.
llvm-svn: 127380
2011-03-10 00:16:32 +00:00
Evan Cheng d4b3f8e009 Revert 127368 and 127371 for now.
llvm-svn: 127376
2011-03-09 23:53:17 +00:00
Evan Cheng a319876559 Restore the default implementation of getCrossCopyRegClass: no need for cross-regclass copies.
llvm-svn: 127371
2011-03-09 23:15:40 +00:00
Evan Cheng ca9a936332 Change the definition of TargetRegisterInfo::getCrossCopyRegClass to be more
flexible.

If it returns a register class that's different from the input, then that's the
register class used for cross-register class copies.
If it returns a register class that's the same as the input, then no cross-
register class copies are needed (normal copies would do).
If it returns null, then it's not at all possible to copy registers of the
specified register class.

llvm-svn: 127368
2011-03-09 22:47:38 +00:00
Jan Sjödin 6348dc0566 Add createELFObjectTargetWriter method to TargetAsmBackend, which enables construction of non-standard ELFObjectWriters that can be used in MCJIT.
llvm-svn: 127346
2011-03-09 18:44:41 +00:00
Jan Sjödin 745fc89f62 Add constructors to MCElfStreamer and MCObjectStreamer to take an extra MCAssembler * argument.
llvm-svn: 127343
2011-03-09 17:33:05 +00:00
Jan Sjödin 27e07c32c6 Add InitializeNativeAsmParser function.
llvm-svn: 127341
2011-03-09 17:25:46 +00:00
John McCall cd5d3ee8c4 Typo. Patch by arrowdodger.
llvm-svn: 127256
2011-03-08 18:01:22 +00:00
Chris Lattner c7b48d40d4 fix incorrect comment.
llvm-svn: 127252
2011-03-08 16:59:03 +00:00
Justin Holewinski 42e9aaa4b1 PTX: Add intrinsic support for ntid, ctaid, and nctaid registers
llvm-svn: 127246
2011-03-08 14:10:18 +00:00
Jakob Stoklund Olesen 71c380f6c7 Let shrinkToUses optionally return a list of now dead machine instructions.
llvm-svn: 127192
2011-03-07 23:29:10 +00:00
Eric Christopher ac546dc62e Typos.
llvm-svn: 127186
2011-03-07 22:48:16 +00:00
Cameron Zwarich df61694417 Move getRegPressureLimit() from TargetLoweringInfo to TargetRegisterInfo.
llvm-svn: 127175
2011-03-07 21:56:36 +00:00
Duncan Sands e5d7369e1e Often GCC can see that NumBuckets is zero here, resulting in a warning
about possibly swapped memset parameters.  Avoid the warning.

llvm-svn: 127170
2011-03-07 19:38:38 +00:00
Jim Grosbach e9fdc06fec Tidy up.
llvm-svn: 127169
2011-03-07 19:28:43 +00:00
Owen Anderson cd526fa15e Use the correct LHS type when determining the legalization of a shift's RHS type.
llvm-svn: 127163
2011-03-07 18:29:47 +00:00
Argyrios Kyrtzidis 35fd6dec7a Try fixing mingw build.
llvm-svn: 127153
2011-03-07 05:35:01 +00:00
Argyrios Kyrtzidis 7260d8f57b Do a compiler check that we use one of the types from PointerUnion[N], instead of a runtime check.
llvm-svn: 127145
2011-03-07 01:30:20 +00:00
Nick Lewycky 92db8e8e39 ConstantInt has some getters which return ConstantInt's or ConstantVector's of
the value splatted into every element. Extend this to getTrue and getFalse which
by providing new overloads that take Types that are either i1 or <N x i1>. Use
it in InstCombine to add vector support to some code, fixing PR8469!

llvm-svn: 127116
2011-03-06 03:36:19 +00:00
Benjamin Kramer 75e7a147ae Avoid zero-sized allocations when copying a fresh DenseMap.
llvm-svn: 127110
2011-03-05 22:00:28 +00:00
Anton Korobeynikov e7410dd0d5 Preliminary support for ARM frame save directives emission via MI flags.
This is just very first approximation how the stuff should be done
(e.g. ARM-only for now). More to follow.

llvm-svn: 127101
2011-03-05 18:43:32 +00:00
Anton Korobeynikov 961013686e Provide hooks to set MI flags in MachineInstrBuilder
llvm-svn: 127100
2011-03-05 18:43:20 +00:00
Anton Korobeynikov a7ec2dcefd Some first rudimentary support for ARM EHABI: print exception table in "text mode".
llvm-svn: 127099
2011-03-05 18:43:15 +00:00
Anton Korobeynikov 65cff414b6 Add FrameSetup MI flags
llvm-svn: 127098
2011-03-05 18:43:04 +00:00
Anton Korobeynikov 489bedcc24 Shorten AsmPrinterFlags filed to accomodate for future Flags field
llvm-svn: 127097
2011-03-05 18:42:54 +00:00
Benjamin Kramer 4d050b6f85 Lazily allocate DenseMaps.
This makes lookup slightly more expensive but it's worth it, unused
DenseMaps are common in LLVM code apparently.

1% speedup on clang -O3 bzip2.c
4% speedup on clang -O3 oggenc.c (Release build of clang on i386/linux)

llvm-svn: 127088
2011-03-05 16:43:41 +00:00
Che-Liang Chiou 369ea3fdb4 ptx: add basic intrinsic support
llvm-svn: 127084
2011-03-05 14:17:37 +00:00
Andrew Trick 5158a86fcb Missing "virtual" keyword. Jakob's review.
llvm-svn: 127070
2011-03-05 08:39:45 +00:00
Andrew Trick 641e2d4f8c Increased the register pressure limit on x86_64 from 8 to 12
regs. This is the only change in this checkin that may affects the
default scheduler. With better register tracking and heuristics, it
doesn't make sense to artificially lower the register limit so much.

Added -sched-high-latency-cycles and X86InstrInfo::isHighLatencyDef to
give the scheduler a way to account for div and sqrt on targets that
don't have an itinerary. It is currently defaults to 10 (the actual
number doesn't matter much), but only takes effect on non-default
schedulers: list-hybrid and list-ilp.

Added several heuristics that can be individually disabled for the
non-default sched=list-ilp mode. This helps us determine how much
better we can do on a given benchmark than the default
scheduler. Certain compute intensive loops run much faster in this
mode with the right set of heuristics, and it doesn't seem to have
much negative impact elsewhere. Not all of the heuristics are needed,
but we still need to experiment to decide which should be disabled by
default for sched=list-ilp.

llvm-svn: 127067
2011-03-05 08:00:22 +00:00
Jin-Gu Kang 0434dbe1fe test commit
llvm-svn: 127059
2011-03-05 02:36:09 +00:00
Jim Grosbach dc55428d7a Teach the register scavenger to take subregs into account when finding a free register.
llvm-svn: 127049
2011-03-05 00:20:19 +00:00
Eric Christopher f045b7ab45 Support unregistering exception frames of functions when they are removed.
Patch by Johannes Schaub!

Fixes PR8548

llvm-svn: 127047
2011-03-04 23:37:39 +00:00
Jakob Stoklund Olesen b8e6fdc23c Renumber slot indexes locally when possible.
Initially, slot indexes are quad-spaced. There is room for inserting up to 3
new instructions between the original instructions.

When we run out of indexes between two instructions, renumber locally using
double-spaced indexes. The original quad-spacing means that we catch up quickly,
and we only have to renumber a handful of instructions to get a monotonic
sequence. This is much faster than renumbering the whole function as we did
before.

llvm-svn: 127023
2011-03-04 19:43:38 +00:00
Jakob Stoklund Olesen 2c5f536a42 Symbolize the default instruction distance.
llvm-svn: 127013
2011-03-04 18:36:51 +00:00
Jakob Stoklund Olesen a1363fac05 Deferred SlotIndex renumbering was a good idea but never used.
llvm-svn: 127008
2011-03-04 18:08:32 +00:00
Devang Patel 213264c03d Add ArrayRef variant.
llvm-svn: 126978
2011-03-04 01:20:33 +00:00
Jakob Stoklund Olesen 1a69e23300 Use an IndexedMap instead of a DenseMap for the live-out cache.
This speeds up updateSSA() so it only accounts for 5% of the live range
splitting time.

llvm-svn: 126972
2011-03-04 00:15:36 +00:00
Bill Wendling f3658f3872 There are times when the landing pad won't have a call to 'eh.selector' in
it. It's been assumed up til now that it would be in its immediate
successor. However, this isn't necessarily the case. It could be in one of its
successor's successors.

Modify the code to more thoroughly check for an 'eh.selector' call in
successors. It only looks at a successor if we get there as a result of an
unconditional branch.

Testcase ObjC/exceptions-4.m in r126968.

llvm-svn: 126969
2011-03-03 23:14:05 +00:00
Jim Grosbach 7e200664f6 Allow a target to choose whether to prefer the scavenger emergency spill slot
be next to the frame pointer or the stack pointer.

llvm-svn: 126956
2011-03-03 20:01:52 +00:00
Richard Osborne af52c52569 Optimize fprintf -> iprintf if there are no floating point arguments
and siprintf is available on the target.

llvm-svn: 126940
2011-03-03 14:20:22 +00:00
Richard Osborne 2dfb888392 Optimize sprintf -> siprintf if there are no floating point arguments
and siprintf is available on the target.

llvm-svn: 126937
2011-03-03 14:09:28 +00:00
Richard Osborne 815de536e5 Optimize printf -> iprintf if there are no floating point arguments
and iprintf is available on the target. Currently iprintf is only
marked as being available on the XCore.

llvm-svn: 126935
2011-03-03 13:17:51 +00:00
Tilmann Scheller 3bc0bcf3ad Use X86_thiscall calling convention for Win64 as well.
llvm-svn: 126934
2011-03-03 07:49:07 +00:00
Jakob Stoklund Olesen 4ec757d588 Represent sentinel slot indexes with a null pointer.
This is much faster than using a pointer to a ManagedStatic object accessed with
a function call. The greedy register allocator is 5% faster overall just from
the SlotIndex default constructor savings.

llvm-svn: 126925
2011-03-03 05:40:04 +00:00