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

14393 Commits

Author SHA1 Message Date
Kevin Enderby
64fe093030 First part of support for generating dwarf for assembly source files with the
-g flag.  In this part we generate the .file for the source being assembled and
the .loc's for the assembled instructions.

The next part will be to generate the dwarf Compile Unit DIE and a dwarf
subprogram DIE for each non-temporary label.

Once the next part is done test cases will be added.  rdar://9275556

llvm-svn: 143509
2011-11-01 22:27:22 +00:00
Sebastian Pop
f72a853709 rename getHostTriple into getDefaultTargetTriple
llvm-svn: 143502
2011-11-01 21:32:20 +00:00
Sebastian Pop
69b2b86143 rename LLVM_HOSTTRIPLE into LLVM_DEFAULT_TARGET_TRIPLE
llvm-svn: 143501
2011-11-01 21:31:44 +00:00
Daniel Dunbar
e79d25dd7a Support/Compiler: Add LLVM_EXTENSION for use where we want to hide pedantic diags.
llvm-svn: 143468
2011-11-01 17:46:12 +00:00
Craig Topper
361c873b52 Fix operand type for x86 pmadd_ub_sw intrinsic.
llvm-svn: 143455
2011-11-01 07:25:22 +00:00
Eli Friedman
62794425dd Remove a couple unused methods. PR11201.
llvm-svn: 143452
2011-11-01 05:11:01 +00:00
Devang Patel
85caca9190 Add utility to append a function to the list of global constructors.
Patch by Kostya Serebryany.

llvm-svn: 143405
2011-10-31 23:58:51 +00:00
Craig Topper
dbf10927d7 Fix operand type for int_x86_ssse3_phadd_sw_128 intrinsic
llvm-svn: 143336
2011-10-31 07:16:37 +00:00
Craig Topper
6eaf58df7c Begin adding AVX2 instructions. No selection support yet other than intrinsics.
llvm-svn: 143331
2011-10-31 02:15:10 +00:00
Craig Topper
f2a9bd3a4a Add intrinsics and feature flag for read/write FS/GS base instructions. Also add AVX2 feature flag.
llvm-svn: 143319
2011-10-30 19:57:21 +00:00
Craig Topper
daa1bc1e9a Mark X86 pcmpeq b/w/d intrinsics as being Commutative. pcmpeqq is already marked as Commutative.
llvm-svn: 143317
2011-10-30 18:33:35 +00:00
Craig Topper
e77289b243 Fix return type for X86 mpsadbw instrinsic. The instruction takes in a vector of 8-bit integers, but produces a vector of 16-bit integers.
llvm-svn: 143313
2011-10-30 17:22:45 +00:00
Dan Gohman
892b86e74c Remove the Alpha backend.
llvm-svn: 143164
2011-10-27 22:56:32 +00:00
Peter Collingbourne
24c42c8534 Add a pinned metadata name for fpaccuracy, and document it
llvm-svn: 143135
2011-10-27 19:19:14 +00:00
Jim Grosbach
ee31b72246 Trailing whitespace.
llvm-svn: 143113
2011-10-27 17:44:01 +00:00
Nick Lewycky
651475977d Teach our Dwarf emission to use the string pool.
llvm-svn: 143097
2011-10-27 06:44:11 +00:00
Lang Hames
e8bb71f80d Rename NonScalarIntSafe to something more appropriate.
llvm-svn: 143080
2011-10-26 23:50:43 +00:00
Nick Lewycky
4aa5a52a80 Reflow lines, fix comments for doxygen style, fix whitespace. No functionality
change.

llvm-svn: 143074
2011-10-26 22:55:33 +00:00
Duncan Sands
5c8fa99c32 The maximum power of 2 dividing a power of 2 is itself. This occurs
in 403.gcc and was spotted by my super-optimizer.

llvm-svn: 143054
2011-10-26 20:55:21 +00:00
Owen Anderson
11396b575d Add support for scattered relocations to the MachO relocatation pretty printer.
llvm-svn: 143051
2011-10-26 20:42:54 +00:00
Owen Anderson
7a9bb4d47f Expand relocation type field to 64 bits. MachO scattered relocations require 33 bits of type info.
llvm-svn: 143032
2011-10-26 17:08:49 +00:00
Eric Christopher
b14f867444 Handle newer cases for freebsd which is approaching 10.0 and not 1.0.
Patch by Dimitry Andric!

llvm-svn: 142995
2011-10-26 00:42:12 +00:00
Michael J. Spencer
6f6b8f7b4d Object/Archive: Add BSD style long file name support and skip internal members.
llvm-svn: 142981
2011-10-25 22:30:42 +00:00
Owen Anderson
69d98376b9 Add support for the notion of "hidden" relocations. On MachO, these are relocation entries that are used as additional information for other, real relocations, rather than being relocations themselves.
I'm not familiar enough with ELF or COFF to know if they should have any relocations marked hidden.

llvm-svn: 142961
2011-10-25 20:35:53 +00:00
Bruno Cardoso Lopes
c7102172e1 This is the first of several patches for Mips direct object generation.
This first patch is for expression variable kinds.

Patch by Jack Carter!

llvm-svn: 142934
2011-10-25 18:13:20 +00:00
Dan Gohman
77125e4240 Remove the Blackfin backend.
llvm-svn: 142880
2011-10-25 00:05:42 +00:00
Dan Gohman
b54d296fd4 Remove the SystemZ backend.
llvm-svn: 142878
2011-10-24 23:48:32 +00:00
Owen Anderson
3bfe29265a More fixes and improvements to MachO relocation pretty-printing, particular for x86 and x86_64 relocations with addends.
llvm-svn: 142875
2011-10-24 23:20:07 +00:00
Dan Gohman
91adc96acd Delete the top-down "Latency" scheduler. Top-down scheduling doesn't handle
physreg dependencies, and upcoming codegen changes will require proper
physreg dependence handling.

llvm-svn: 142816
2011-10-24 18:01:06 +00:00
Dan Gohman
5d5a540002 Delete the Latency scheduling preference.
llvm-svn: 142815
2011-10-24 17:56:48 +00:00
Benjamin Kramer
0638353f56 Implement comparison operators for BranchProbability in a way that can't overflow INT64_MAX.
Add a test case for the edge case that triggers this. Thanks to Chandler for bringing this to my attention.

llvm-svn: 142794
2011-10-24 13:50:56 +00:00
Chandler Carruth
d04f838629 Remove return heuristics from the static branch probabilities, and
introduce no-return or unreachable heuristics.

The return heuristics from the Ball and Larus paper don't work well in
practice as they pessimize early return paths. The only good hitrate
return heuristics are those for:
 - NULL return
 - Constant return
 - negative integer return

Only the last of these three can possibly require significant code for
the returning block, and even the last is fairly rare and usually also
a constant. As a consequence, even for the cold return paths, there is
little code on that return path, and so little code density to be gained
by sinking it. The places where sinking these blocks is valuable (inner
loops) will already be weighted appropriately as the edge is a loop-exit
branch.

All of this aside, early returns are nearly as common as all three of
these return categories, and should actually be predicted as taken!
Rather than muddy the waters of the static predictions, just remain
silent on returns and let the CFG itself dictate any layout or other
issues.

However, the return heuristic was flagging one very important case:
unreachable. Unfortunately it still gave a 1/4 chance of the
branch-to-unreachable occuring. It also didn't do a rigorous job of
finding those blocks which post-dominate an unreachable block.

This patch builds a more powerful analysis that should flag all branches
to blocks known to then reach unreachable. It also has better worst-case
runtime complexity by not looping through successors for each block. The
previous code would perform an N^2 walk in the event of a single entry
block branching to N successors with a switch where each successor falls
through to the next and they finally fall through to a return.

Test case added for noreturn heuristics. Also doxygen comments improved
along the way.

llvm-svn: 142793
2011-10-24 12:01:08 +00:00
Chandler Carruth
e443224c31 Doxygen-ify the comments on the public interface for BPI. Also, move the
two more subtle routines to the bottom and expand on their cautionary
comments a bit. No functionality or actual interface change here.

llvm-svn: 142789
2011-10-24 05:55:58 +00:00
Chandler Carruth
c5722dbec0 Simplify the design of BranchProbabilityInfo by collapsing it into
a single class. Previously it was split between two classes, one
internal and one external. The concern seemed to center around exposing
the weights used, but those can remain confined to the implementation
file.

Having a single class to maintain the state and analyses in use will
also simplify several of the enhancements I want to make to our static
heuristics.

llvm-svn: 142783
2011-10-24 01:40:45 +00:00
Chandler Carruth
151d4fc273 Teach the BranchProbabilityInfo pass to print its results, and use that
to bring it under direct test instead of merely indirectly testing it in
the BlockFrequencyInfo pass.

The next step is to start adding tests for the various heuristics
employed, and to start fixing those heuristics once they're under test.

llvm-svn: 142778
2011-10-23 21:21:50 +00:00
Chandler Carruth
c10018cd49 Now that we have comparison on probabilities, add some static functions
to get important constant branch probabilities and use them for finding
the best branch out of a set of possibilities.

llvm-svn: 142762
2011-10-23 20:10:34 +00:00
Benjamin Kramer
9adc582e35 Add compare operators to BranchProbability and use it to determine if an edge is hot.
llvm-svn: 142751
2011-10-23 11:19:14 +00:00
Craig Topper
fd96157f13 Remove intrinsics for X86 BLSI, BLSMSK, and BLSR intrinsics and replace with custom isel lowering code.
llvm-svn: 142642
2011-10-21 06:55:01 +00:00
Chandler Carruth
380e0d5013 Implement a block placement pass based on the branch probability and
block frequency analyses. This differs substantially from the existing
block-placement pass in LLVM:

1) It operates on the Machine-IR in the CodeGen layer. This exposes much
   more (and more precise) information and opportunities. Also, the
   results are more stable due to fewer transforms ocurring after the
   pass runs.
2) It uses the generalized probability and frequency analyses. These can
   model static heuristics, code annotation derived heuristics as well
   as eventual profile loading. By basing the optimization on the
   analysis interface it can work from any (or a combination) of these
   inputs.
3) It uses a more aggressive algorithm, both building chains from tho
   bottom up to maximize benefit, and using an SCC-based walk to layout
   chains of blocks in a profitable ordering without O(N^2) iterations
   which the old pass involves.

The pass is currently gated behind a flag, and not enabled by default
because it still needs to grow some important features. Most notably, it
needs to support loop aligning and careful layout of loop structures
much as done by hand currently in CodePlacementOpt. Once it supports
these, and has sufficient testing and quality tuning, it should replace
both of these passes.

Thanks to Nick Lewycky and Richard Smith for help authoring & debugging
this, and to Jakob, Andy, Eric, Jim, and probably a few others I'm
forgetting for reviewing and answering all my questions. Writing
a backend pass is *sooo* much better now than it used to be. =D

llvm-svn: 142641
2011-10-21 06:46:38 +00:00
Dan Gohman
666f749afc Delete the list-tdrr scheduler. Top-down schedulers are going away
because they don't support physical register dependencies.

llvm-svn: 142620
2011-10-20 21:44:34 +00:00
Lang Hames
747fa3d477 Haven't yet found a nice way to handle TargetData verification in the
AsmParser. This patch adds validation for target data layout strings upon
construction of TargetData objects. An attempt to construct a TargetData object
from a malformed string will trigger an assertion.

llvm-svn: 142605
2011-10-20 19:24:44 +00:00
Duncan Sands
a18fd5ecb4 Comment out or remove unused parameter names so as to avoid a slew of
compiler warnings.

llvm-svn: 142574
2011-10-20 08:57:54 +00:00
Duncan Sands
4afb312617 Avoid warnings about the parameter G being unused.
llvm-svn: 142573
2011-10-20 08:56:41 +00:00
Eli Friedman
e8f8cf1f33 Refactor code from inlining and globalopt that checks whether a function definition is unused, and enhance it so it can tell that functions which are only used by a blockaddress are in fact dead. This probably doesn't happen much on most code, but the Linux kernel's _THIS_IP_ can trigger this issue with blockaddress. (GlobalDCE can also handle the given tescase, but we only run that at -O3.) Found while looking at PR11180.
llvm-svn: 142572
2011-10-20 05:23:42 +00:00
Eli Friedman
ba48f316b1 Remove useless code.
llvm-svn: 142570
2011-10-20 04:33:44 +00:00
David Greene
09fc0034ab Add NAME Member
Add a Value named "NAME" to each Record.  This will be set to the def or defm
name when instantiating multiclasses.  This will replace the #NAME# processing
hack once paste functionality is in place.

llvm-svn: 142518
2011-10-19 13:04:13 +00:00
David Greene
68668c01b0 Call Record Initializer
Call the common Record initializer code from constructors.

llvm-svn: 142509
2011-10-19 13:03:21 +00:00
David Greene
76a2654db8 Add Name Init Record Constructor
Add a Record constructor that takes the Record name as an Init.  This
is more work toward paste functionality.

llvm-svn: 142508
2011-10-19 13:03:15 +00:00
David Greene
2c6b483c06 Fix 80-col Violation
Split up the initializer list for Record to avoid 80-col issues.

llvm-svn: 142507
2011-10-19 13:03:10 +00:00
David Greene
07316ea195 Fix Name Check
Avoid a potential assert by asking for record names as strings explicitly.

llvm-svn: 142503
2011-10-19 13:02:48 +00:00