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

6060 Commits

Author SHA1 Message Date
Anders Carlsson
900a684ae7 All MMX shift instructions took a <2 x i32> vector as the shift amount parameter. Change this to be <1 x i64> instead, which matches the assembler instruction.
llvm-svn: 45027
2007-12-14 06:38:54 +00:00
Bill Wendling
c8c611e88f Add flags to indicate that there are "never" side effects or that there "may be"
side effects for machine instructions.

llvm-svn: 45022
2007-12-14 01:48:59 +00:00
Evan Cheng
740c2d731f Cosmetic change.
llvm-svn: 44961
2007-12-12 23:15:59 +00:00
Evan Cheng
64a1febf9a Implicit def instructions, e.g. X86::IMPLICIT_DEF_GR32, are always re-materializable and they should not be spilled.
llvm-svn: 44960
2007-12-12 23:12:09 +00:00
Duncan Sands
47526c4a42 Remove host endianness info from TargetData and
put it in a new header System/Host.h instead.
Instead of getting the endianness from configure,
calculate it directly.

llvm-svn: 44959
2007-12-12 23:03:45 +00:00
Dan Gohman
4bf237b584 Remove a forward-declaration for a non-existant class.
llvm-svn: 44955
2007-12-12 22:25:09 +00:00
Anton Korobeynikov
638a7cffbc Use vector for child storage instead of map. This will also make
our life during future GraphTraits'ing slightly easier.

llvm-svn: 44952
2007-12-12 19:08:44 +00:00
Christopher Lamb
6d12d7c0fe Implement part of review feedback for address spaces.
llvm-svn: 44933
2007-12-12 08:44:39 +00:00
Bill Wendling
e8eea25ad3 Bit masks conflicted. Needed to bump them by one.
llvm-svn: 44903
2007-12-12 01:51:58 +00:00
Gordon Henriksen
3f070cf3b9 Add (very basic) bindings for ModuleProvider.
llvm-svn: 44899
2007-12-12 01:04:30 +00:00
Anton Korobeynikov
f5c6b49537 Remove Trie::Edge class. Now edge labels are stored into nodes itself.
llvm-svn: 44880
2007-12-11 21:55:38 +00:00
Wojciech Matyjewicz
f9fb2b23fe Use correct member access operator.
(my test commit as well)

llvm-svn: 44868
2007-12-11 17:46:25 +00:00
Christopher Lamb
7368604860 Implement address space attribute for LLVM pointer types. Address spaces are
regions of memory that have a target specific relationship, as described in the 
Embedded C Technical Report. 

This also implements the 2007-12-11-AddressSpaces test, 
which demonstrates how address space attributes can be used in LLVM IR.

In addition, this patch changes the bitcode signature for stores (in a backwards 
compatible manner), such that the pointer type, rather than the pointee type, is 
encoded. This permits type information in the pointer (e.g. address space) to be 
preserved for stores.

LangRef updates are forthcoming.

llvm-svn: 44858
2007-12-11 08:59:05 +00:00
Anton Korobeynikov
0fc72aee23 Add first and really dirty version of generic Trie structure
llvm-svn: 44851
2007-12-11 06:53:44 +00:00
Evan Cheng
45c08c8337 Switch over to MachineLoopInfo.
llvm-svn: 44838
2007-12-11 02:09:15 +00:00
Gordon Henriksen
c6f9e0beef CollectorMetadata and Collector are rejiggered to get along with
per-function collector model. Collector is now the factory for
CollectorMetadata, so the latter may be subclassed.

llvm-svn: 44827
2007-12-11 00:30:17 +00:00
Chris Lattner
f7c53191c0 Move TargetData::hostIsLittleEndian out of line, which means we
don't have to #include config.h in it.  #including config.h breaks
other projects that have their own autoconf stuff and try to #include
the llvm headers.  One obscure example is llvm-gcc.

llvm-svn: 44825
2007-12-11 00:28:59 +00:00
Gordon Henriksen
aff6e2bba2 Adding Ocaml bindings for the bitreader as requested by Sarah
Thompson. Usage should be something like this:

open Llvm
open Llvm_bitreader

match read_bitcode_file fn with
  | Bitreader_failure msg ->
      prerr_endline msg
  | Bitreader_success m -> 
      ...;
      dispose_module m

Compile with: ocamlc llvm.cma llvm_bitreader.cma
              ocamlopt llvm.cmxa llvm_bitreader.cmxa

llvm-svn: 44824
2007-12-11 00:20:48 +00:00
Chris Lattner
5ca42cd342 Fix PR1850 by removing an unsafe transformation from VMCore/ConstantFold.cpp.
Reimplement the xform in Analysis/ConstantFolding.cpp where we can use
targetdata to validate that it is safe.  While I'm in there, fix some const
correctness issues and generalize the interface to the "operand folder".

llvm-svn: 44817
2007-12-10 22:53:04 +00:00
Ted Kremenek
d0f4955b73 Added two bounds checks to the BitVector class to detect
out-of-bounds bit accesses.  The checks are only performed
in a Debug build.

llvm-svn: 44815
2007-12-10 22:28:35 +00:00
Chris Lattner
f6fc9924a4 split isBinaryOp into a static and member version.
llvm-svn: 44814
2007-12-10 22:18:53 +00:00
Duncan Sands
b7ac459292 Make PruneEH update the nounwind/noreturn attributes
on functions as it calculates them.

llvm-svn: 44802
2007-12-10 19:09:40 +00:00
Duncan Sands
1279851352 Fix PR1836: in the interpreter, read and write apints
using the minimum possible number of bytes.  For little
endian targets run on little endian machines, apints are
stored in memory from LSB to MSB as before.  For big endian
targets on big endian machines they are stored from MSB to
LSB which wasn't always the case before (if the target and
host endianness doesn't match values are stored according
to the host's endianness).  Doing this requires knowing the
endianness of the host, which is determined when configuring -
thanks go to Anton for this.  Only having access to little
endian machines I was unable to properly test the big endian
part, which is also the most complicated...

llvm-svn: 44796
2007-12-10 17:43:13 +00:00
Gordon Henriksen
aadbdd1a62 Delete the CollectorNamePool if it should become empty.
llvm-svn: 44775
2007-12-10 03:35:18 +00:00
Gordon Henriksen
5d201e0bcc Adding a collector name attribute to Function in the IR. These
methods are new to Function:

  bool hasCollector() const;
  const std::string &getCollector() const;
  void setCollector(const std::string &);
  void clearCollector();

The assembly representation is as such:

  define void @f() gc "shadow-stack" { ...

The implementation uses an on-the-side table to map Functions to 
collector names, such that there is no overhead. A StringPool is 
further used to unique collector names, which are extremely
likely to be unique per process.

llvm-svn: 44769
2007-12-10 03:18:06 +00:00
Gordon Henriksen
8430f1ff9a Reverting dtor devirtualization patch.
_sabre_: it has a major problem: by the time ~Value is run, all of the "parts" of the derived classes have been destroyed
_sabre_: the vtable lives to fight another day

llvm-svn: 44760
2007-12-10 02:14:30 +00:00
Chris Lattner
825404d39d remove some dead code.
llvm-svn: 44757
2007-12-10 01:51:38 +00:00
Gordon Henriksen
a18a78e6e5 Devirtualizing Value destructor (PR889). Patch by Pawel Kunio!
llvm-svn: 44747
2007-12-09 22:46:10 +00:00
Gordon Henriksen
3d1a3ce823 Fix a very silly typo.
llvm-svn: 44732
2007-12-09 01:12:08 +00:00
Bill Wendling
8d8d9a2f5e Reverting 44702. It wasn't correct to rename them.
llvm-svn: 44727
2007-12-08 23:58:46 +00:00
Gordon Henriksen
902a20040f Incorporating review feedback from Reid.
llvm-svn: 44713
2007-12-08 20:10:40 +00:00
Chris Lattner
8b88401fbe remove dead #include.
llvm-svn: 44711
2007-12-08 19:06:21 +00:00
Chris Lattner
d62e99bd4a eliminate dependency on Bitcode headers.
llvm-svn: 44709
2007-12-08 19:01:44 +00:00
Chris Lattner
44b8c0e9e1 remove dead #include, APInt.h already has the needed forward decls.
llvm-svn: 44708
2007-12-08 19:00:38 +00:00
Gordon Henriksen
e187dc4bfa Adding a StringPool data structure, which GC will use.
llvm-svn: 44705
2007-12-08 17:07:47 +00:00
Bill Wendling
d10837def7 Renaming:
isTriviallyReMaterializable -> hasNoSideEffects
  isReallyTriviallyReMaterializable -> isTriviallyReMaterializable

llvm-svn: 44702
2007-12-08 07:17:56 +00:00
Chris Lattner
68527b332e Implement correct isa<UnaryInstruction>, problem reported by "ST".
llvm-svn: 44697
2007-12-08 04:37:52 +00:00
Owen Anderson
e3de18ac1d Fix several cache coherence bugs in MemDep/GVN that were found. Also add some (disabled) debugging code
to make such problems easier to diagnose in the future, written by Duncan Sands.

llvm-svn: 44695
2007-12-08 01:37:09 +00:00
Bill Wendling
c08dedb060 Initial commit of the machine code LICM pass. It successfully hoists this:
_foo:
        li r2, 0
LBB1_1: ; bb
        li r5, 0
        stw r5, 0(r3)
        addi r2, r2, 1
        addi r3, r3, 4
        cmplw cr0, r2, r4
        bne cr0, LBB1_1 ; bb
LBB1_2: ; return
        blr 

to:

_foo:
        li r2, 0
        li r5, 0
LBB1_1: ; bb
        stw r5, 0(r3)
        addi r2, r2, 1
        addi r3, r3, 4
        cmplw cr0, r2, r4
        bne cr0, LBB1_1 ; bb
LBB1_2: ; return
        blr

ZOMG!! :-)

Moar to come...

llvm-svn: 44687
2007-12-07 21:42:31 +00:00
Owen Anderson
5b2701d634 Fix a stupid error that Chris pointed out.
llvm-svn: 44674
2007-12-07 04:04:55 +00:00
Chris Lattner
a7caf360c9 add a new ExecutionEngine::createJIT which can be used if you only want
to create a JIT.  This lets you specify JIT-specific configuration items
like the JITMemoryManager to use.

llvm-svn: 44647
2007-12-06 01:34:04 +00:00
Chris Lattner
e297cb5408 simplify creation of the interpreter, make ExecutionEngine ctor protected,
delete one ExecutionEngine ctor, minor cleanup.

llvm-svn: 44646
2007-12-06 01:08:09 +00:00
Evan Cheng
1d289d0146 Fix for PR1831: if all defs of an interval are re-materializable, then it's a preferred spill candiate.
llvm-svn: 44644
2007-12-06 00:01:56 +00:00
Chris Lattner
fefff1c2f7 improve header guard
llvm-svn: 44641
2007-12-05 23:45:41 +00:00
Chris Lattner
3043dc44cd split the JIT memory management code out from the main JIT logic into its
own JITMemoryManager interface.  There is no functionality change with 
this patch.

llvm-svn: 44640
2007-12-05 23:39:57 +00:00
Evan Cheng
1dc8e83707 - Mark last use of a split interval as kill instead of letting spiller track it.
This allows an important optimization to be re-enabled.
- If all uses / defs of a split interval can be folded, give the interval a
  low spill weight so it would not be picked in case spilling is needed (avoid
  pushing other intervals in the same BB to be spilled).

llvm-svn: 44601
2007-12-05 03:22:34 +00:00
Evan Cheng
8464a0bf00 Add a argument to storeRegToStackSlot and storeRegToAddr to specify whether
the stored register is killed.

llvm-svn: 44600
2007-12-05 03:14:33 +00:00
Scott Michel
4b27319533 fixed header attribution
llvm-svn: 44599
2007-12-05 02:08:01 +00:00
Scott Michel
871b3a4fd4 More stuff for CellSPU -- this should be enough to get an error-free
compilation (no files missing). Test cases remain to be checked in.

llvm-svn: 44598
2007-12-05 02:01:41 +00:00
Ted Kremenek
f1c4beda54 Added "Emitter" functor to allow easy emitting of elements of a container
using std::for_each.

llvm-svn: 44589
2007-12-05 00:13:07 +00:00