1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00
Commit Graph

58516 Commits

Author SHA1 Message Date
Sean Silva
29f0a1b1d7 tblgen: Reuse function that is 2 lines above.
llvm-svn: 171937
2013-01-09 02:17:13 +00:00
Sean Silva
020d07bb39 fix copy-paste-o
llvm-svn: 171936
2013-01-09 02:11:57 +00:00
Sean Silva
83bc854f4c docs: Bring TableGen syntax a bit closer to reality.
It's not just def's but actually a limited subset of Object's that are
allowed inside a multiclass.

Spotted by Joel Jones.

llvm-svn: 171935
2013-01-09 02:11:55 +00:00
Eric Christopher
38c8e00aa9 These functions have default arguments of 0 for the last arg. Use
them.

llvm-svn: 171933
2013-01-09 01:57:54 +00:00
Eric Christopher
fca80429d8 These functions have default arguments of 0 for the last arg. Use
them and add one where it seemed obvious that we wanted one.

llvm-svn: 171932
2013-01-09 01:35:34 +00:00
Nadav Rotem
9c27f36e59 Cost Model: Move the 'max unroll factor' variable to the TTI and add initial Cost Model support on ARM.
llvm-svn: 171928
2013-01-09 01:15:42 +00:00
Shuxin Yang
f10c29887b Add comment to the definition of Constant::isZeroValue().
(There already has a concise comment to the declaration.)

Thank Eric Christopher for his feedback!

llvm-svn: 171926
2013-01-09 00:53:25 +00:00
Bill Wendling
4fe54a5965 Forgot the namespace identifier.
llvm-svn: 171924
2013-01-09 00:32:55 +00:00
Bill Wendling
0b4cfb71d8 Add the integer value of the ConstantInt instead of the Constant* value.
This is causing some problems. The root cause is unknown at this time.

llvm-svn: 171923
2013-01-09 00:32:08 +00:00
Shuxin Yang
2dc1fb7889 Consider expression "0.0 - X" as the negation of X if
- this expression is explicitly marked no-signed-zero, or
  - no-signed-zero of this expression can be derived from some context.

llvm-svn: 171922
2013-01-09 00:13:41 +00:00
Eric Christopher
11f9d2e631 Move the string pools down into the units. No functional change.
llvm-svn: 171905
2013-01-08 22:22:06 +00:00
Eli Bendersky
a8101425b4 Simplify the code a bit: MCRelaxableFragment doesn't need a separate getInstSize
method because getContents().size() already covers it. So computeFragmentSize
can use the generic MCEncodedFragment interface when querying both Data and
Relaxable fragments for contents sizes.

No change in functionality

llvm-svn: 171903
2013-01-08 22:05:10 +00:00
Nick Kledzik
c1a589d12a Fix memory leak in YAML I/O.
Stop using BumpPtrAllocator for HNodes because
they have fields (vector, map) which require HNode 
destructors to be run.

llvm-svn: 171896
2013-01-08 21:04:44 +00:00
Jack Carter
ac447a4205 This patch produces the correct addend value for
an R_MIPS_GPREL16 relocation.


Contributer: Jack Carter
llvm-svn: 171882
2013-01-08 19:01:28 +00:00
Jack Carter
f36167d718 This patch produces the correct pointer size
value in the 64 bit .eh_frame section.

It doesn't however allow exception handling to work
yet since it depends on the correct relocation model
being set in the ELF header flags.


Contributer: Jack Carter
llvm-svn: 171881
2013-01-08 18:53:20 +00:00
Preston Gurd
4b0d66f924 Pad Short Functions for Intel Atom
The current Intel Atom microarchitecture has a feature whereby
when a function returns early then it is slightly faster to execute
a sequence of NOP instructions to wait until the return address is ready,
as opposed to simply stalling on the ret instruction until
the return address is ready.

When compiling for X86 Atom only, this patch will run a pass,
called "X86PadShortFunction" which will add NOP instructions where less
than four cycles elapse between function entry and return.

It includes tests.

This patch has been updated to address Nadav's review comments
- Optimize only at >= O1 and don't do optimization if -Os is set
- Stores MachineBasicBlock* instead of BBNum
- Uses DenseMap instead of std::map
- Fixes placement of braces

Patch by Andy Zhang.

llvm-svn: 171879
2013-01-08 18:27:24 +00:00
Eli Bendersky
9b6b50b663 Rename statistic for instruction fragments -> relaxable
llvm-svn: 171872
2013-01-08 17:41:59 +00:00
Nadav Rotem
df0bfd2e95 Code cleanup: refactor the switch statements in the generation of reduction variables into an IR builder call.
llvm-svn: 171871
2013-01-08 17:37:45 +00:00
Nadav Rotem
5bb578a21c Rename the enum members to match the LLVM coding style.
llvm-svn: 171868
2013-01-08 17:23:17 +00:00
Tim Northover
5599b9abd4 Add fp128 rtlib function names to LLVM
llvm-svn: 171867
2013-01-08 17:09:59 +00:00
Tim Northover
dde4cda878 Allow the asm printer to print fp128 values properly.
llvm-svn: 171866
2013-01-08 16:56:23 +00:00
Bill Wendling
c63cf71b21 Make sure we don't emit instructions before a landingpad instruction.
PR14782

llvm-svn: 171846
2013-01-08 10:51:32 +00:00
Chandler Carruth
a6bb195552 Sink a function that refers to the SelectionDAG into that library in the
one file where it is called as a static function. Nuke the declaration
and the definition in lib/CodeGen, along with the include of
SelectionDAG.h from this file.

There is no dependency edge from lib/CodeGen to
lib/CodeGen/SelectionDAG, so it isn't valid for a routine in lib/CodeGen
to reference the DAG. There is a dependency from
lib/CodeGen/SelectionDAG on lib/CodeGen. This breaks one violation of
this layering.

llvm-svn: 171842
2013-01-08 05:11:57 +00:00
Eric Christopher
eedffc4f2b Remove the llvm-local DW_TAG_vector_type tag and add a test to
make sure that vector types do work.

llvm-svn: 171833
2013-01-08 01:53:52 +00:00
Eric Christopher
c80c91cf3a Fix comment.
llvm-svn: 171832
2013-01-08 01:53:42 +00:00
Lenny Maiorani
e3962ae49e Split changeset_ty using iterators instead of loops.
llvm-svn: 171829
2013-01-08 01:08:52 +00:00
David Blaikie
b1e37c8c96 Mark artificial types as such in the annotated debug output.
llvm-svn: 171826
2013-01-08 00:31:02 +00:00
Eli Bendersky
4699968d0b Renamed MCInstFragment to MCRelaxableFragment and added some comments.
No change in functionality.

llvm-svn: 171822
2013-01-08 00:22:56 +00:00
Eric Christopher
08e34159b3 Remove what appears to be a dead llvm-specific debug tag.
llvm-svn: 171821
2013-01-08 00:16:33 +00:00
Jakob Stoklund Olesen
6b7b534145 Pack MachineOperand bitfields better.
Previously, 4 bits were unused.

llvm-svn: 171814
2013-01-07 23:21:44 +00:00
Jakob Stoklund Olesen
187b9abc61 Pack MachineInstr fields better.
This shrinks MachineInstr to 64 bytes (from 72).

llvm-svn: 171813
2013-01-07 23:21:41 +00:00
Nadav Rotem
4aa065a2a3 LoopVectorizer: Add support for floating point reductions
llvm-svn: 171812
2013-01-07 23:13:00 +00:00
Shuxin Yang
1c3b5e4f89 Cosmetical changne in order to conform to coding std.
Thank Eric Christopher for figuring out these problems!

llvm-svn: 171805
2013-01-07 22:41:28 +00:00
Eric Christopher
4b9394acd5 Whitespace and 80-col.
llvm-svn: 171804
2013-01-07 22:40:48 +00:00
Eric Christopher
b2abc44cbd Whitespace and 80-col.
llvm-svn: 171803
2013-01-07 22:40:45 +00:00
Nadav Rotem
5906222eab LoopVectorizer: When we vectorizer and widen loops we process many elements at once. This is a good thing, except for
small loops. On small loops post-loop that handles scalars (and runs slower) can take more time to execute than the
rest of the loop. This patch disables widening of loops with a small static trip count.

llvm-svn: 171798
2013-01-07 21:54:51 +00:00
Eli Bendersky
4236f7b1ee Add the align_to_end option to .bundle_lock in the MC implementation of aligned
bundling. The document describing this feature and the implementation has also
been updated:

https://sites.google.com/a/chromium.org/dev/nativeclient/pnacl/aligned-bundling-support-in-llvm

llvm-svn: 171797
2013-01-07 21:51:08 +00:00
Shuxin Yang
9c476471f2 This change is to implement following rules:
o. X/C1 * C2 => X * (C2/C1) (if C2/C1 is neither special FP nor denormal)
  o. X/C1 * C2 -> X/(C1/C2)   (if C2/C1 is either specical FP or denormal, but C1/C2 is a normal Fp)

     Let MDC denote multiplication or dividion with one & only one operand being a constant
  o. (MDC ± C1) * C2 => (MDC * C2) ± (C1 * C2)
     (so long as the constant-folding doesn't yield any denormal or special value)

llvm-svn: 171793
2013-01-07 21:39:23 +00:00
Michael Gottesman
75a619b8c2 Fixed EOL whitespace.
llvm-svn: 171791
2013-01-07 21:26:07 +00:00
Jim Grosbach
786a509ba5 ARM: Copy-paste error.
llvm-svn: 171790
2013-01-07 21:24:35 +00:00
Jim Grosbach
3cf2dcd376 ARM: Fix a few copy-paste errors.
s/X86/ARM/

llvm-svn: 171789
2013-01-07 21:12:13 +00:00
Chad Rosier
515c53ac4f [ms-inline asm] Make sure the NullStreamParser doesn't try to emit labels when
parsing MS-style inline assembly.

llvm-svn: 171784
2013-01-07 20:34:12 +00:00
Eric Christopher
5969e9a435 Add more comments to what's going on here.
llvm-svn: 171780
2013-01-07 19:32:45 +00:00
Eric Christopher
ba738518f0 Add support for separating strings for the split debug info DWARF5
proposal. This leaves the strings in the skeleton die as strp,
but in all dwo files they're accessed now via DW_FORM_GNU_str_index.

Add support for dumping these sections and modify the fission-cu.ll
testcase to have the correct strings and form. Fix a small bug
in the fixed form sizes routine that involved out of array accesses
for the table and add a FIXME in the extractFast routine to fix
this up.

llvm-svn: 171779
2013-01-07 19:32:41 +00:00
Bill Schmidt
250d836387 This patch addresses bug 14678 by fixing two problems in medium code model
code generation.  Variables addressed through a GlobalAlias were not being
handled, and variables with available_externally linkage were treated
incorrectly.  The patch contains two new tests to verify the correct code
generation for these cases.

llvm-svn: 171778
2013-01-07 19:29:18 +00:00
Jordan Rose
c95190a559 Change SMRange to be half-open (exclusive end) instead of closed (inclusive)
This is necessary not only for representing empty ranges, but for handling
multibyte characters in the input. (If the end pointer in a range refers to
a multibyte character, should it point to the beginning or the end of the
character in a char array?) Some of the code in the asm parsers was already
assuming this anyway.

llvm-svn: 171765
2013-01-07 19:00:49 +00:00
Shuxin Yang
0640c4a0dc Implement APFloat::isDenormal()
llvm-svn: 171764
2013-01-07 18:59:35 +00:00
Quentin Colombet
994ef807c2 When code size is the priority (Oz, MinSize attribute), help llvm
turning a code like this:

if (foo)
   free(foo)

into that:
free(foo)

Move a call to free from basic block FB into FB's predecessor, P,
when the path from P to FB is taken only if the argument of free is
not equal to NULL.

Some restrictions apply on P and FB to be sure that this code motion
is profitable. Namely:
1. FB must have only one predecessor P.
2. FB must contain only the call to free plus an unconditional
   branch to S.
3. P's successors are FB and S.

Because of 1., we will not increase the code size when moving the call
to free from FB to P.
Because of 2., FB will be empty after the move.
Because of 2. and 3., P's branch instruction becomes useless, so as FB
(simplifycfg will do the job).

llvm-svn: 171762
2013-01-07 18:37:41 +00:00
Chandler Carruth
5a20cb13b3 Move TypeFinder.h into the IR tree, it clearly belongs with the IR library.
llvm-svn: 171749
2013-01-07 15:43:51 +00:00
Chandler Carruth
4c4c8c33e1 Move CallGraphSCCPass.h into the Analysis tree; that's where the
implementation lives already.

llvm-svn: 171746
2013-01-07 15:26:48 +00:00