Commit Graph

34461 Commits

Author SHA1 Message Date
Dale Johannesen
a72a5a095d Fix PR 1688. See comments there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42181 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-20 23:47:58 +00:00
Devang Patel
9ee49c541b Update aux. info associated with an instruction before erasing instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42180 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-20 23:45:50 +00:00
Devang Patel
0f0daea654 Do not override user specified section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42179 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-20 23:07:37 +00:00
Devang Patel
d15dd8c525 Don't increment invalid iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42178 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-20 23:01:50 +00:00
Duncan Sands
d7944ca61c Testcase for PR1678.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42171 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-20 18:56:24 +00:00
Evan Cheng
b7c8017208 Disable if-conversion for this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42170 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-20 18:06:22 +00:00
Evan Cheng
4226689f44 -enable-arm-if-conversion is gone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42169 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-20 18:03:23 +00:00
Dale Johannesen
4bf6ac5f40 Fix dumb regression in constant folding (Regression/C/casts)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42165 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-20 16:50:21 +00:00
Gordon Henriksen
c20f5b086e Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42164 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-20 16:48:18 +00:00
Gordon Henriksen
a8c3660c1a Incorporating review feedback for GC verifier patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42163 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-20 16:47:41 +00:00
Dan Gohman
a4ddacf60b Fix several more entries in the x86 reload/remat folding tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42162 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-20 14:17:21 +00:00
Gabor Greif
ab8588bf3c use typenames equivalent to
(u)intval, because latter are not
present in older caml/mlvalues.h
(e.g. 2004/07/07, 1.48.6.1)

Using this as a workaround for now,
until --without-ocaml works
or we settle on a better solution


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42160 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-20 10:20:34 +00:00
Dale Johannesen
41de436ca3 another long double buglet
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42159 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-20 01:27:54 +00:00
Nick Lewycky
1af92b05d5 Excuse me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42158 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-20 00:57:00 +00:00
Nick Lewycky
e29578afd5 Fix optimization. %x = sub %x, %y does not imply that %y is zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42157 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-20 00:48:36 +00:00
Evan Cheng
17207ddf38 Enable if-conversion for ARM by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42156 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-20 00:48:22 +00:00
Dale Johannesen
73328d14ac More long double fixes. x86_64 should build now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42155 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 23:55:34 +00:00
Evan Cheng
e71bff7405 Avoid referencing deleted instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42153 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 21:48:07 +00:00
Ted Kremenek
96345186a5 Previously GraphWriter assumed operator*() for node_iterator always
returned a reference type.  This patch allows operator*() to return a
non-reference type while still maintaining the old behavior when it
does return a reference type.

This patch was motivated when I tried to use "df_iterator" (see
llvm/ADT/DepthFirstIterator.h) as a "node_iterator", as df_iterator
does not return a reference type and thus we would get a compilation
error when trying to take the address of a temporary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42151 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 21:26:49 +00:00
Devang Patel
f2038b1d93 Avoid unsafe promotion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42149 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 20:18:51 +00:00
Evan Cheng
fab7eff0fa PSHUFDmi, etc. are actually folding a load, not a store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42147 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 19:02:47 +00:00
Dale Johannesen
f4d4832724 Fix longdouble -> uint conversion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42143 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 17:53:26 +00:00
Chris Lattner
6693da003b reject things like "declare internal @foo"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42140 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 17:14:45 +00:00
Owen Anderson
742f9b6682 Add a flag to mark a dirty cache entry. This is not yet used, but will eventually
help non-local memdep caching.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42137 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 16:13:57 +00:00
Dale Johannesen
ac1220551f Fix some long double issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42133 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 14:22:58 +00:00
Duncan Sands
46318cdfd0 Improve comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42132 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 10:25:38 +00:00
Duncan Sands
7801644332 Partial fix for PR1678: correct some parts of constant
fold that were missed in the fix for PR1646.  Probably
this null/not-null logic should be factorized somewhere.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42131 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 10:16:17 +00:00
Duncan Sands
892c7e4a23 A global variable with external weak linkage can be null, while
an alias could alias such a global variable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42130 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 10:10:31 +00:00
Gabor Greif
9dbf8ed140 include alloca.h if available. this helps Solaris, but intnat and uintnat types are still undefined, causing errors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42129 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 09:29:58 +00:00
Duncan Sands
437c27cd9d Testcase for PR1678.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42128 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 07:43:17 +00:00
Evan Cheng
713a98dee8 Use struct SDep instead of std::pair for SUnit pred and succ lists. First step
in tracking physical register output dependencies.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42125 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 01:38:40 +00:00
Evan Cheng
dcfa73fe3c Set CCR (EFLAGS) copy cost to -1, i.e. extremely expensive to copy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42124 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 01:36:39 +00:00
Evan Cheng
a3ca3149f2 Add CopyCost to TargetRegisterClass. This specifies the cost of copying a value
between two registers in the specific class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42123 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 01:35:01 +00:00
Devang Patel
babbe27007 Relax loop ExitCondition predicate restriction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42122 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 00:28:47 +00:00
Devang Patel
968eee2aa7 Filter loops where split condition's false branch is not empty. For example
for (int i = 0; i < N; ++i) {
  if (i == somevalue)
    dosomething();
   else
    dosomethingelse();
}


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42121 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 00:15:16 +00:00
Devang Patel
84ef08bfee Bail out early, before modifying anything.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42120 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 00:11:01 +00:00
Devang Patel
4e062e520a Work is incomplete. Loop is not modified at all right now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42119 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-19 00:08:13 +00:00
Devang Patel
0f2fb60a18 ooops...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42118 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-18 23:58:14 +00:00
Evan Cheng
921c85c487 Clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42112 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-18 22:56:31 +00:00
Evan Cheng
e0480d2ec2 Fix a bogus splat xform:
shuffle <undef, undef, x, undef>, <undef, undef, undef, undef>, <2, 2, 2, 2>
!=
<undef, undef, x, undef>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42111 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-18 21:54:37 +00:00
Gabor Greif
d84c3ab4a7 rename test, it is obviously misspelled
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42108 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-18 21:42:39 +00:00
Dale Johannesen
c7b21d520a Prevent crash on long double.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42103 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-18 18:36:59 +00:00
Gordon Henriksen
344be5fbec Tests of the ocaml (and thus C) bindings for constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42101 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-18 18:07:51 +00:00
Dan Gohman
869b2b2c23 Move the entries for 64-bit CMP, IMUL, and a few others into the correct
tables so that they are eligible for reload/remat folding. And add
entries for JMP and CALL.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42094 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-18 14:59:14 +00:00
Gordon Henriksen
8ef426baa3 Adding ocaml language bindings for the vmcore and bitwriter libraries. These are
built atop the C language bindings, and user programs can link with them as 
such:

  # Bytecode
  ocamlc -cc g++ llvm.cma llvmbitwriter.cma -o example example.ml
  # Native
  ocamlopt -cc g++ llvm.cmxa llvmbitwriter.cmxa -o example.opt example.ml

The vmcore.ml test exercises most/all of the APIs thus far bound. Unfortunately,
they're not yet numerous enough to write hello world. But:

  $ cat example.ml
  (* example.ml *)
  
  open Llvm
  open Llvm_bitwriter
  
  let _ =
    let filename = Sys.argv.(1) in
    let m = create_module filename in
    
    let v = make_int_constant i32_type 42 false in
    let g = define_global "hello_world" v m in
    
    if not (write_bitcode_file m filename) then exit 1;
    
    dispose_module m;

  $ ocamlc -cc g++ llvm.cma llvm_bitwriter.cma -o example example.ml
  File "example.ml", line 11, characters 6-7:
  Warning Y: unused variable g.
  $ ./example example.bc
  $ llvm-dis < example.bc
  ; ModuleID = '<stdin>'
  @hello_world = global i32 42            ; <i32*> [#uses=0]

The ocaml test cases provide effective tests for the C interfaces.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42093 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-18 12:49:39 +00:00
Gordon Henriksen
54c7e12164 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42092 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-18 12:27:13 +00:00
Gordon Henriksen
75155ef56d git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42091 91177308-0d34-0410-b5e6-96231b3b80d8 2007-09-18 12:26:59 +00:00
Gordon Henriksen
0908d49c22 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42090 91177308-0d34-0410-b5e6-96231b3b80d8 2007-09-18 12:26:17 +00:00
Gordon Henriksen
b5085212b0 Incorporating review feedback for GC verifier patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42087 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-18 10:14:30 +00:00
Bill Wendling
ce613280f9 Don't pass back a reference to a temporary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42086 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-18 09:10:16 +00:00