1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
Commit Graph

84940 Commits

Author SHA1 Message Date
Dmitri Gribenko
aee81e7cae Fix Doxygen issues:
* wrap code blocks in \code ... \endcode;
* refer to parameter names in paragraphs correctly (\arg is not what most
  people want -- it starts a new paragraph).

llvm-svn: 163790
2012-09-13 12:34:29 +00:00
Dmitri Gribenko
3406f9daa4 Fix a doxygen issue: these examples are supposed to be displayed preformatted.
llvm-svn: 163787
2012-09-13 11:42:30 +00:00
Craig Topper
a529169108 Fix function name in comment.
llvm-svn: 163783
2012-09-13 07:26:59 +00:00
Nick Lewycky
5931f2813a Fix typo in comment.
llvm-svn: 163782
2012-09-13 07:01:25 +00:00
Craig Topper
e2e98bb26b Add a new compression type to ModRM table that detects when the memory modRM byte represent 8 instructions and the reg modRM byte represents up to 64 instructions. Reduces modRM table from 43k entreis to 25k entries. Based on a patch from Manman Ren.
llvm-svn: 163774
2012-09-13 05:45:42 +00:00
Jim Grosbach
f33100ecac MCJIT: relocation addends encoded in the target aren't quite so easy.
The assumption that the target address for the relocation will always be
sizeof(intptr_t) and will always contain an addend for the relocation
value is very wrong. Default to no addend for now.

rdar://12157052

llvm-svn: 163765
2012-09-13 01:24:37 +00:00
Jim Grosbach
4b9568b260 MCJIT: Make sure to mask off non-type-field bits.
When comparing to the macho relocation type enum value, make sure we're only
comparing against the bits in the RelType that correspond.

llvm-svn: 163764
2012-09-13 01:24:35 +00:00
Jim Grosbach
ef895e2df9 MCJIT: Pass the i386 MachO relocation type properly.
llvm-svn: 163763
2012-09-13 01:24:32 +00:00
Jakob Stoklund Olesen
b15912aafd Don't fold indexed loads into TCRETURNmi64.
We don't have enough GR64_TC registers when calling a varargs function
with 6 arguments. Since %al holds the number of vector registers used,
only %r11 is available as a scratch register.

This means that addressing modes using both base and index registers
can't be folded into TCRETURNmi64.

<rdar://problem/12282281>

llvm-svn: 163761
2012-09-13 00:25:00 +00:00
Bill Wendling
a959ed6f52 Introduce the __llvm_gcov_flush function.
This function writes out the current values of the counters and then resets
them. This can be used similarly to the __gcov_flush function to sync the
counters when need be. For instance, in a situation where the application
doesn't exit.
<rdar://problem/12185886>

llvm-svn: 163757
2012-09-13 00:09:55 +00:00
Eric Christopher
853a000638 Recommit, with fixes:
Add some support for dealing with an object pointer on arguments.

    Part of rdar://9797999

which now supports adding the object pointer attribute to the
subprogram as it should.

llvm-svn: 163754
2012-09-12 23:36:19 +00:00
Akira Hatanaka
2706c4f9e2 Misc.
1. Remove RA from list of allocatable registers
2. Enable d,y,r constraint inline assembly instructions

Patch by Reed Kotler.

llvm-svn: 163753
2012-09-12 23:27:55 +00:00
Michael Liao
e600a8a616 Fix PR11985
- BlockAddress has no support of BA + offset form and there is no way to
  propagate that offset into machine operand;
- Add BA + offset support and a new interface 'getTargetBlockAddress' to
  simplify target block address forming;
- All targets are modified to use new interface and X86 backend is enhanced to
  support BA + offset addressing.

llvm-svn: 163743
2012-09-12 21:43:09 +00:00
Dan Gohman
71475f803c Detect overflow in the path count computation. rdar://12277446.
llvm-svn: 163739
2012-09-12 20:45:17 +00:00
Owen Anderson
59ecb9ceab Remove an overly-aggressive assertion. The code following this assertion already knows how to handle the case where DstRC was NULL, so it's not actually protecting us from anything, and this pattern can come up when using unknown_class operands in the SelectionDAG.
llvm-svn: 163736
2012-09-12 20:09:19 +00:00
Jakob Stoklund Olesen
e94ae657e3 Delete dead code.
llvm-svn: 163735
2012-09-12 20:04:17 +00:00
Eric Christopher
e2dae503e6 Revert "Add some support for dealing with an object pointer on arguments."
This should be done on the subprogram, not the variable itself.

llvm-svn: 163734
2012-09-12 18:42:31 +00:00
Chad Rosier
e57a278d0d [ms-inline asm] Make the operand size directives case insensitive.
llvm-svn: 163729
2012-09-12 18:24:26 +00:00
Jim Grosbach
adfdb46f2c TableGen: Convert an assert() to a proper diagnostic.
llvm-svn: 163726
2012-09-12 17:40:25 +00:00
Manman Ren
9949a09bfb PGO: preserve branch-weight metadata when removing a case which jumps
to the default target.

llvm-svn: 163724
2012-09-12 17:04:11 +00:00
Dmitri Gribenko
8982c8a34d Fix a couple of Doxygen comment issues pointed out by -Wdocumentation.
llvm-svn: 163721
2012-09-12 16:59:47 +00:00
Roman Divacky
5ad9880cb1 Enable exceptions handling on PPC64 now that cr misaligned spilling
was fixed in r163713.

llvm-svn: 163715
2012-09-12 15:29:32 +00:00
Alexander Potapenko
33d40fe071 Suppress the warnings about unused parameters in changeColor()
llvm-svn: 163714
2012-09-12 15:01:33 +00:00
Roman Divacky
3d302860e6 This patch corrects logic in PPCFrameLowering for save and restore of
nonvolatile condition register fields across calls under the SVR4 ABIs.                                            
                                                                                                                   
 * With the 64-bit ABI, the save location is at a fixed offset of 8 from                                           
the stack pointer.  The frame pointer cannot be used to access this                                                
portion of the stack frame since the distance from the frame pointer may                                           
change with alloca calls.                                                                                          
                                                                                                                   
 * With the 32-bit ABI, the save location is just below the general
register save area, and is accessed via the frame pointer like the rest
of the save areas.  This is an optional slot, so it must only be created                                           
if any of CR2, CR3, and CR4 were modified.                                                                      
                                                                                                                   
 * For both ABIs, save/restore logic is generated only if one of the     
nonvolatile CR fields were modified.                                   

I also took this opportunity to clean up an extra FIXME in
PPCFrameLowering.h.  Save area offsets for 32-bit GPRs are meaningless
for the 64-bit ABI, so I removed them for correctness and efficiency.


Fixes PR13708 and partially also PR13623. It lets us enable exception handling
on PPC64.

Patch by William J. Schmidt!

llvm-svn: 163713
2012-09-12 14:47:47 +00:00
Roman Divacky
a811b158e5 Add support for AMD Geode.
llvm-svn: 163710
2012-09-12 14:36:02 +00:00
Kristof Beyls
76d939497b Fix constant folding through bitcasts by no longer relying on undefined behaviour (converting NaN values between float and double).
SelectionDAG::getConstantFP(double Val, EVT VT, bool isTarget);
should not be used when Val is not a simple constant (as the comment in
SelectionDAG.h indicates). This patch avoids using this function
when folding an unknown constant through a bitcast, where it cannot be
guaranteed that Val will be a simple constant.

llvm-svn: 163703
2012-09-12 11:25:02 +00:00
Nadav Rotem
71183ed37c Add a flag to disable the code that looks for allocas which escaped the lifetime regions. This is useful for debugging. No testcase because without this check we fail on assertions when finding escaped allocas.
llvm-svn: 163702
2012-09-12 11:06:26 +00:00
James Molloy
df778b78ea Add a function computeRegisterLiveness() to MachineBasicBlock. This uses analyzePhysReg() from r163694 to heuristically try and determine the liveness state of a physical register upon arrival at a particular instruction in a block.
The search for liveness is clipped to a specific number of instructions around the target MachineInstr, in order to avoid degenerating into an O(N^2) algorithm. It tries to use various clues about how instructions around (both before and after) a given MachineInstr use that register, to determine its state at the MachineInstr.

llvm-svn: 163695
2012-09-12 10:18:23 +00:00
James Molloy
5fc1ae1f6a Add an analyzePhysReg() function to MachineOperandIteratorBase that analyses an instruction's use of a physical register, analogous to analyzeVirtReg.
Rename RegInfo to VirtRegInfo so as not to be confused with the new PhysRegInfo.

llvm-svn: 163694
2012-09-12 10:03:31 +00:00
Duncan Sands
495145097c When calling print directly on a global (eg from the debugger) it
was printing a newline that doesn't occur when printing other kinds
of LLVM values.  Move the printing of that newline elsewhere, making
globals print the same as other values while leaving the output when
printing an entire module unchanged.  Patch by Saša Tomić.

llvm-svn: 163693
2012-09-12 09:55:51 +00:00
Nadav Rotem
da5869fc42 Enable stack-coloring, in hope that the recent fixes will enable correct dragonegg self-hosting.
llvm-svn: 163687
2012-09-12 07:58:35 +00:00
Lang Hames
ec4a366e08 Make findLastUseBefore handle reg-unit liveness.
findLastUseBefore was previous considering virtreg liveness only, leading to
incorrect live intervals for reg units when instrs with physreg operands were
moved up.
 

llvm-svn: 163685
2012-09-12 06:56:16 +00:00
Craig Topper
24d6cafc79 Indentation fixes. No functional change.
llvm-svn: 163682
2012-09-12 06:20:41 +00:00
Manman Ren
fdeb41a212 Release build: guard dump functions with
"#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)"

No functional change. Update r163344.

llvm-svn: 163679
2012-09-12 05:06:18 +00:00
Nadav Rotem
64c3cf5b29 Stack coloring: remove lifetime intervals which contain escaped allocas.
The input program may contain intructions which are not inside lifetime
markers. This can happen due to a bug in the compiler or due to a bug in
user code (for example, returning a reference to a local variable).
This commit adds checks that all of the instructions in the function and
invalidates lifetime ranges which do not contain all of the instructions.

llvm-svn: 163678
2012-09-12 04:57:37 +00:00
Eric Christopher
9a8f37667b Add some support for dealing with an object pointer on arguments.
Part of rdar://9797999

llvm-svn: 163667
2012-09-12 00:26:55 +00:00
Owen Anderson
e42d2ba20d Improve tblgen code cleanliness: create an unknown_class, from which the unknown def inherits. Make tblgen check for that class, rather than checking for the def itself.
llvm-svn: 163664
2012-09-11 23:47:08 +00:00
Owen Anderson
8aa2a6cbb7 Compute a map from register names to registers, rather than scanning the list of registers every time we want to look up a register by name.
llvm-svn: 163659
2012-09-11 23:32:17 +00:00
Chad Rosier
446698775e Add documentation.
llvm-svn: 163658
2012-09-11 23:20:20 +00:00
Chad Rosier
4658136842 Add a few virtual functions to the abstract MCParsedAsmOperand class.
llvm-svn: 163655
2012-09-11 23:03:44 +00:00
Chad Rosier
786e0643c5 Rename the isMemory() function to isMem(). No functional change intended.
llvm-svn: 163654
2012-09-11 23:02:35 +00:00
Manman Ren
1a047422a0 Release build: guard dump functions with
"#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)"

No functional change. Update r163339.

llvm-svn: 163653
2012-09-11 22:23:19 +00:00
Chad Rosier
c778c0a3f4 StringSwitchify.
llvm-svn: 163649
2012-09-11 21:10:25 +00:00
Chad Rosier
e7a6502bbe Simplify logic. No functional change intended.
llvm-svn: 163648
2012-09-11 20:57:04 +00:00
Chad Rosier
2853061544 [ms-inline asm] Split the parsing of IR asm strings into GCC and MS variants.
Add support in the EmitMSInlineAsmStr() function for handling integer consts.

llvm-svn: 163645
2012-09-11 19:09:56 +00:00
Manman Ren
d492bca8a6 SimplifyCFG: preserve branch-weight metadata when creating a new switch from
a pair of switch/branch where both depend on the value of the same variable and
the default case of the first switch/branch goes to the second switch/branch.

Code clean up and fixed a few issues:
1> handling the case where some cases of the 2nd switch are invalidated
2> correctly calculate the weight for the 2nd switch when it is a conditional eq

Testing case is modified from Alastair's original patch.

llvm-svn: 163635
2012-09-11 17:43:35 +00:00
Jakob Stoklund Olesen
8a149baa44 Add TRI::getSubRegIndexLaneMask().
Sub-register lane masks are bitmasks that can be used to determine if
two sub-registers of a virtual register will overlap. For example, ARM's
ssub0 and ssub1 sub-register indices don't overlap each other, but both
overlap dsub0 and qsub0.

The lane masks will be accurate on most targets, but on targets that use
sub-register indexes in an irregular way, the masks may conservatively
report that two sub-register indices overlap when the eventually
allocated physregs don't.

Irregular register banks also mean that the bits in a lane mask can't be
mapped onto register units, but the concept is similar.

llvm-svn: 163630
2012-09-11 16:34:08 +00:00
Jakob Stoklund Olesen
d2bb5cf28e Clean the sub-reg index composition maps at emission.
Preserve the Composites map in the CodeGenSubRegIndex class so it can be
used to determine which sub-register indices can actually be composed.

llvm-svn: 163629
2012-09-11 16:34:05 +00:00
Jakob Stoklund Olesen
1e7f74aaa8 Add MCRI::getNumSubRegIndices() and start checking SubRegIndex ranges.
Apparently, NumSubRegIndices was completely unused before. Adjust it by
one to include the null subreg index, just like getNumRegs() includes
the null register.

llvm-svn: 163628
2012-09-11 16:34:02 +00:00
Chad Rosier
9d8aeab807 Formatting. No functional change intended.
llvm-svn: 163627
2012-09-11 16:33:10 +00:00