oota-llvm.git
15 years agoTest for PR2401
Owen Anderson [Sun, 1 Jun 2008 21:55:55 +0000 (21:55 +0000)]
Test for PR2401

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51849 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDon't remove the memcpy when call slot substitution fails.
Owen Anderson [Sun, 1 Jun 2008 21:52:16 +0000 (21:52 +0000)]
Don't remove the memcpy when call slot substitution fails.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51848 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemember to update the reverse non-local cache when cleaning up dirty entries. This...
Owen Anderson [Sun, 1 Jun 2008 21:03:52 +0000 (21:03 +0000)]
Remember to update the reverse non-local cache when cleaning up dirty entries.  This fixes PR2397.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51846 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake ping more aggressive in finding nonlocal caching errors.
Owen Anderson [Sun, 1 Jun 2008 20:51:41 +0000 (20:51 +0000)]
Make ping more aggressive in finding nonlocal caching errors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51845 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPrune empty dirs
Anton Korobeynikov [Sun, 1 Jun 2008 20:11:03 +0000 (20:11 +0000)]
Prune empty dirs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51844 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd a predicate.
Chris Lattner [Sun, 1 Jun 2008 18:09:04 +0000 (18:09 +0000)]
add a predicate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51842 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoInitialize members properly during construction
Anton Korobeynikov [Sun, 1 Jun 2008 16:22:49 +0000 (16:22 +0000)]
Initialize members properly during construction

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51841 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen simplifying a call to a bitcast function, tighten up
Duncan Sands [Sun, 1 Jun 2008 07:38:42 +0000 (07:38 +0000)]
When simplifying a call to a bitcast function, tighten up
the conditions for performing the transform when only the
function declaration is available: no longer allow turning
i32 into i64 for example.  Only allow changing between
pointer types, and between pointer types and integers of
the same size.  For return values ptr -> intptr was already
allowed; I added ptr -> ptr and intptr -> ptr while there.
As shown by a recent objc testcase, changing the way
parameters/return values are passed can be fatal when calling
code written in assembler that directly manipulates call
arguments and return values unless the transform has no
impact on the way they are passed at the codegen level.
While it is possible to imagine an ABI that treats integers
of pointer size differently to pointers, I don't think LLVM
supports any so the transform should now be safe while still
being useful.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51834 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFixed flag issue that was generating infinite loop while in list scheduling.
Bruno Cardoso Lopes [Sun, 1 Jun 2008 03:49:39 +0000 (03:49 +0000)]
Fixed flag issue that was generating infinite loop while in list scheduling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51833 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a standard for control-flow unreachable assertions in functions that return
Nick Lewycky [Sat, 31 May 2008 23:54:55 +0000 (23:54 +0000)]
Add a standard for control-flow unreachable assertions in functions that return
values, so as to avoid warnings on some platforms.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51831 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoupdates to some svn:ignore properties
Gabor Greif [Sat, 31 May 2008 22:59:42 +0000 (22:59 +0000)]
updates to some svn:ignore properties

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51829 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoupdate this patch to handle an extraneous &1. This should be pulled
Chris Lattner [Sat, 31 May 2008 19:50:53 +0000 (19:50 +0000)]
update this patch to handle an extraneous &1.  This should be pulled
into the 2.3 release branch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51824 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAsmWriter support for insertvalue/extractvalue. These instructions can
Dan Gohman [Sat, 31 May 2008 19:12:39 +0000 (19:12 +0000)]
AsmWriter support for insertvalue/extractvalue. These instructions can
now round-trip through assembly and bitcode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51823 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImproved bitcode support for insertvalue/extractvalue.
Dan Gohman [Sat, 31 May 2008 19:11:15 +0000 (19:11 +0000)]
Improved bitcode support for insertvalue/extractvalue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51822 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a copy+paste error in a comment.
Dan Gohman [Sat, 31 May 2008 19:09:47 +0000 (19:09 +0000)]
Fix a copy+paste error in a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51821 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix some bugs with the handling of indices in insertvalue/extractvalue.
Dan Gohman [Sat, 31 May 2008 19:09:08 +0000 (19:09 +0000)]
Fix some bugs with the handling of indices in insertvalue/extractvalue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51820 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPeer through sext/zext when looking for not(cmp).
Nick Lewycky [Sat, 31 May 2008 19:01:33 +0000 (19:01 +0000)]
Peer through sext/zext when looking for not(cmp).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51819 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoYay us! Every one of these examples turns into icmp/zext/ret.
Nick Lewycky [Sat, 31 May 2008 18:20:26 +0000 (18:20 +0000)]
Yay us! Every one of these examples turns into icmp/zext/ret.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51818 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd more i1 optimizations. add, sub, mul, s/udiv on i1 are now simplified away.
Nick Lewycky [Sat, 31 May 2008 17:59:52 +0000 (17:59 +0000)]
Add more i1 optimizations. add, sub, mul, s/udiv on i1 are now simplified away.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51817 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdding i1 is always Xor.
Nick Lewycky [Sat, 31 May 2008 17:10:28 +0000 (17:10 +0000)]
Adding i1 is always Xor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51816 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCallback was not executed on OS X when it was a function.
Mikhail Glushenkov [Sat, 31 May 2008 13:43:21 +0000 (13:43 +0000)]
Callback was not executed on OS X when it was a function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51814 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix the CBE's handling of instructions whose result is an i1. Previously,
Chris Lattner [Sat, 31 May 2008 09:23:55 +0000 (09:23 +0000)]
Fix the CBE's handling of instructions whose result is an i1.  Previously,
we did not truncate the value down to i1 with (x&1).  This caused a problem
when the computation of x was nontrivial, for example, "add i1 1, 1" would
return 2 instead of 0.

This makes the testcase compile into:

...
  llvm_cbe_t = (((llvm_cbe_r == 0u) + (llvm_cbe_r == 0u))&1);
  llvm_cbe_u = (((unsigned int )(bool )llvm_cbe_t));
...

instead of:

...
  llvm_cbe_t = ((llvm_cbe_r == 0u) + (llvm_cbe_r == 0u));
  llvm_cbe_u = (((unsigned int )(bool )llvm_cbe_t));
...

This fixes a miscompilation of mediabench/adpcm/rawdaudio/rawdaudio and
403.gcc with the CBE, regressions from LLVM 2.2. Tanya, please pull
this into the release branch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51813 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFactor several methods, including getInversePredicate and
Dan Gohman [Sat, 31 May 2008 02:47:54 +0000 (02:47 +0000)]
Factor several methods, including getInversePredicate and
getSwappedPredicate, from ICmpInst and FCmpInst into common
methods in CmpInst. This allows CmpInsts to be manipulated
generically.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51810 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTeach the DAGISelEmitter to not compute the variable_ops operand
Dan Gohman [Sat, 31 May 2008 02:11:25 +0000 (02:11 +0000)]
Teach the DAGISelEmitter to not compute the variable_ops operand
index for the input pattern in terms of the output pattern. Instead
keep track of how many fixed operands the input pattern actually
has, and have the input matching code pass the output-emitting
function that index value. This simplifies the code, disentangles
variables_ops from the support for predication operations, and
makes variable_ops more robust.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51808 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove an unused variable.
Dan Gohman [Sat, 31 May 2008 01:44:25 +0000 (01:44 +0000)]
Remove an unused variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51807 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIR, bitcode reader, bitcode writer, and asmparser changes to
Dan Gohman [Sat, 31 May 2008 00:58:22 +0000 (00:58 +0000)]
IR, bitcode reader, bitcode writer, and asmparser changes to
insertvalue and extractvalue to use constant indices instead of
Value* indices. And begin updating LangRef.html.

There's definately more to come here, but I'm checking this
basic support in now to make it available to people who are
interested.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51806 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert 51775.
Evan Cheng [Fri, 30 May 2008 22:47:19 +0000 (22:47 +0000)]
Revert 51775.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51795 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd an isAggregateType predicate.
Dan Gohman [Fri, 30 May 2008 22:40:06 +0000 (22:40 +0000)]
Add an isAggregateType predicate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51794 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix indentation.
Evan Cheng [Fri, 30 May 2008 22:39:32 +0000 (22:39 +0000)]
Fix indentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51793 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix indentation.
Evan Cheng [Fri, 30 May 2008 22:39:18 +0000 (22:39 +0000)]
Fix indentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51792 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd an operator< for SmallVector.
Dan Gohman [Fri, 30 May 2008 22:37:47 +0000 (22:37 +0000)]
Add an operator< for SmallVector.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51791 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThe coalescer doesn't need LiveVariables now that we have register use iterators.
Owen Anderson [Fri, 30 May 2008 22:37:27 +0000 (22:37 +0000)]
The coalescer doesn't need LiveVariables now that we have register use iterators.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51790 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorewrite operand loops to use iterators
Gabor Greif [Fri, 30 May 2008 21:24:22 +0000 (21:24 +0000)]
rewrite operand loops to use iterators

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51789 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake all help strings start in upper case.
Mikhail Glushenkov [Fri, 30 May 2008 21:14:10 +0000 (21:14 +0000)]
Make all help strings start in upper case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51788 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoForgot to commit this file.
Owen Anderson [Fri, 30 May 2008 20:14:04 +0000 (20:14 +0000)]
Forgot to commit this file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51786 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix the -opt switch and add a test case for it.
Mikhail Glushenkov [Fri, 30 May 2008 19:56:27 +0000 (19:56 +0000)]
Fix the -opt switch and add a test case for it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51784 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix indentation.
Mikhail Glushenkov [Fri, 30 May 2008 18:53:09 +0000 (18:53 +0000)]
Fix indentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51782 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a --dry-run option to llvmc2. Patch by Holger Schurig.
Mikhail Glushenkov [Fri, 30 May 2008 18:48:52 +0000 (18:48 +0000)]
Add a --dry-run option to llvmc2. Patch by Holger Schurig.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51781 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPreserve the register coallescer, and update live intervals more correctly by trigger...
Owen Anderson [Fri, 30 May 2008 18:38:26 +0000 (18:38 +0000)]
Preserve the register coallescer, and update live intervals more correctly by triggering a renumbering after phi elimination.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51780 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSince LCSSA switched over to DenseMap, we have to be more careful to avoid iterator...
Owen Anderson [Fri, 30 May 2008 17:31:01 +0000 (17:31 +0000)]
Since LCSSA switched over to DenseMap, we have to be more careful to avoid iterator invalidation.  Fixes PR2385.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51777 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPatches for building llvm on Solaris x86. Contributed by Nathan Keynes.
Evan Cheng [Fri, 30 May 2008 17:16:20 +0000 (17:16 +0000)]
Patches for building llvm on Solaris x86. Contributed by Nathan Keynes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51775 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoGive a proper error message when a command line option is defined more than
Matthijs Kooijman [Fri, 30 May 2008 13:26:11 +0000 (13:26 +0000)]
Give a proper error message when a command line option is defined more than
once (ie, at two different places in the source, not two times on the
commandline).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51771 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse eraseFromParent() instead of doing that manually in two places.
Matthijs Kooijman [Fri, 30 May 2008 12:35:46 +0000 (12:35 +0000)]
Use eraseFromParent() instead of doing that manually in two places.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51770 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoLet Instruction::getOpcodeName() return something useful for the new
Matthijs Kooijman [Fri, 30 May 2008 10:31:54 +0000 (10:31 +0000)]
Let Instruction::getOpcodeName() return something useful for the new
insertvalue / extractvalue instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51766 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd the "AsCheapAsAMove" flag to some 64-bit xor instructions.
Bill Wendling [Fri, 30 May 2008 06:47:04 +0000 (06:47 +0000)]
Add the "AsCheapAsAMove" flag to some 64-bit xor instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51761 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a --save-temps option.
Mikhail Glushenkov [Fri, 30 May 2008 06:29:17 +0000 (06:29 +0000)]
Add a --save-temps option.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51760 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a check for side effect-free options (specified only in the OptionList).
Mikhail Glushenkov [Fri, 30 May 2008 06:28:37 +0000 (06:28 +0000)]
Add a check for side effect-free options (specified only in the OptionList).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51759 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDocumentation update.
Mikhail Glushenkov [Fri, 30 May 2008 06:28:00 +0000 (06:28 +0000)]
Documentation update.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51758 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRefactoring: remove code duplication introduced in the previous patch.
Mikhail Glushenkov [Fri, 30 May 2008 06:27:29 +0000 (06:27 +0000)]
Refactoring: remove code duplication introduced in the previous patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51757 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRefactoring: split CollectProperties into two separate function objects.
Mikhail Glushenkov [Fri, 30 May 2008 06:27:02 +0000 (06:27 +0000)]
Refactoring: split CollectProperties into two separate function objects.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51756 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoShow argv[0] in error messages (like gcc).
Mikhail Glushenkov [Fri, 30 May 2008 06:26:35 +0000 (06:26 +0000)]
Show argv[0] in error messages (like gcc).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51755 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoNew feature: OptionList.
Mikhail Glushenkov [Fri, 30 May 2008 06:26:08 +0000 (06:26 +0000)]
New feature: OptionList.

It can be handy to have all information about options gathered in a single place
to provide an overview of all supported options. This patch allows the following:

def Options : OptionList<[
(switch_option "E", (help "Help string")),
(alias_option "quiet", "q")
...
]>;

Tool-specific option properties (like 'append_cmd') have (obviously) no meaning in
this context, so the only properties that are allowed are 'help' and 'required'.

See usage example in examples/Clang.td.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51754 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDocumentation update.
Mikhail Glushenkov [Fri, 30 May 2008 06:25:24 +0000 (06:25 +0000)]
Documentation update.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51753 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoA small optimization: use static char* array instead of StrVector.
Mikhail Glushenkov [Fri, 30 May 2008 06:24:49 +0000 (06:24 +0000)]
A small optimization: use static char* array instead of StrVector.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51752 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake it possible to test if the '-o' option is provided.
Mikhail Glushenkov [Fri, 30 May 2008 06:24:07 +0000 (06:24 +0000)]
Make it possible to test if the '-o' option is provided.

The following is now allowed:

    (case (not_empty "o"), do_something, ...)

This didn't work previously because "-o" is built-in.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51751 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix: 'sink' handling was broken.
Mikhail Glushenkov [Fri, 30 May 2008 06:23:29 +0000 (06:23 +0000)]
Fix: 'sink' handling was broken.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51750 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd support for option aliases.
Mikhail Glushenkov [Fri, 30 May 2008 06:22:52 +0000 (06:22 +0000)]
Add support for option aliases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51749 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAllow nesting of case expressions.
Mikhail Glushenkov [Fri, 30 May 2008 06:22:15 +0000 (06:22 +0000)]
Allow nesting of case expressions.

The following is now legal:

    (case (in_language "c"),
          (case (switch_on "E"), "gcc -x c -E $INFILE", (default), "gcc -x c $INFILE"),
          (default),
          "gcc $INFILE $OUTFILE")

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51748 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSmall error message improvement.
Mikhail Glushenkov [Fri, 30 May 2008 06:21:48 +0000 (06:21 +0000)]
Small error message improvement.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51747 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove RequireDefault parameter from EmitCaseConstructHandler.
Mikhail Glushenkov [Fri, 30 May 2008 06:21:21 +0000 (06:21 +0000)]
Remove RequireDefault parameter from EmitCaseConstructHandler.

There are now no situations when 'default' is required.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51746 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix some headers.
Mikhail Glushenkov [Fri, 30 May 2008 06:20:54 +0000 (06:20 +0000)]
Fix some headers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51745 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoNew tests for the 'case' expression: not_empty, in_language.
Mikhail Glushenkov [Fri, 30 May 2008 06:19:52 +0000 (06:19 +0000)]
New tests for the 'case' expression: not_empty, in_language.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51744 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago-E should print to stdout.
Mikhail Glushenkov [Fri, 30 May 2008 06:18:50 +0000 (06:18 +0000)]
-E should print to stdout.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51743 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake it possible to have multiple input languages for a single tool.
Mikhail Glushenkov [Fri, 30 May 2008 06:18:16 +0000 (06:18 +0000)]
Make it possible to have multiple input languages for a single tool.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51742 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRename StringVector to StrVector (to be consistent with LLVMCConfigurationEmitter...
Mikhail Glushenkov [Fri, 30 May 2008 06:17:29 +0000 (06:17 +0000)]
Rename StringVector to StrVector (to be consistent with LLVMCConfigurationEmitter.cpp).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51741 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMinor error message fixes.
Mikhail Glushenkov [Fri, 30 May 2008 06:16:59 +0000 (06:16 +0000)]
Minor error message fixes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51740 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDocumentation and examples improvements
Mikhail Glushenkov [Fri, 30 May 2008 06:16:32 +0000 (06:16 +0000)]
Documentation and examples improvements

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51739 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoBetter error reporting for the 'case' construct.
Mikhail Glushenkov [Fri, 30 May 2008 06:15:47 +0000 (06:15 +0000)]
Better error reporting for the 'case' construct.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51738 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDo not generate empty 'if's for the output_suffix property.
Mikhail Glushenkov [Fri, 30 May 2008 06:15:20 +0000 (06:15 +0000)]
Do not generate empty 'if's for the output_suffix property.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51737 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate documentation, add examples.
Mikhail Glushenkov [Fri, 30 May 2008 06:14:42 +0000 (06:14 +0000)]
Update documentation, add examples.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51736 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRename LLVMC-Tutorial.rst to LLVMC-Reference.rst
Mikhail Glushenkov [Fri, 30 May 2008 06:14:01 +0000 (06:14 +0000)]
Rename LLVMC-Tutorial.rst to LLVMC-Reference.rst

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51735 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake it possible to use hooks like this: '$CALL(MyHook)/path/to/file'.
Mikhail Glushenkov [Fri, 30 May 2008 06:13:29 +0000 (06:13 +0000)]
Make it possible to use hooks like this: '$CALL(MyHook)/path/to/file'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51734 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake it possible to change the output file suffix based on command-line options.
Mikhail Glushenkov [Fri, 30 May 2008 06:13:02 +0000 (06:13 +0000)]
Make it possible to change the output file suffix based on command-line options.

For instance, the following command:

    llvmc2 -E hello.c

now generates a file with the correct suffix (hello.i).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51733 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd support for user-provided hooks and environment variable reads to the cmd_line...
Mikhail Glushenkov [Fri, 30 May 2008 06:12:24 +0000 (06:12 +0000)]
Add support for user-provided hooks and environment variable reads to the cmd_line tool property.

Used like this: (cmd_line "$CALL(MyHook) --option -o $ENV(VARIABLE) $CALL(AnotherHook)")
Also works with case expressions.

Hook declarations are auto-generated, the definitions should be provided by the user
(just drop a .cpp file in the tools/llvmc2 directory).

Hooks should live in the "hooks" namespace and have type std::string hooks::Hook(void).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51732 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoEnable the response file ('llvmc @file') support.
Mikhail Glushenkov [Fri, 30 May 2008 06:11:45 +0000 (06:11 +0000)]
Enable the response file ('llvmc @file') support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51731 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate the code to the fact that StringSet now lives in llvm/ADT.
Mikhail Glushenkov [Fri, 30 May 2008 06:11:18 +0000 (06:11 +0000)]
Update the code to the fact that StringSet now lives in llvm/ADT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51730 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSome small tweaks to make the generated code prettier.
Mikhail Glushenkov [Fri, 30 May 2008 06:10:47 +0000 (06:10 +0000)]
Some small tweaks to make the generated code prettier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51729 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake it possible to use the generalised 'case' construct in the cmd_line property.
Mikhail Glushenkov [Fri, 30 May 2008 06:10:19 +0000 (06:10 +0000)]
Make it possible to use the generalised 'case' construct in the cmd_line property.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51728 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a generalised 'case' construct.
Mikhail Glushenkov [Fri, 30 May 2008 06:08:50 +0000 (06:08 +0000)]
Add a generalised 'case' construct.

Besides assigning edge weights, it will also be used by the cmd_line tool property.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51727 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUnbreak this test.
Nick Lewycky [Fri, 30 May 2008 05:02:37 +0000 (05:02 +0000)]
Unbreak this test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51726 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove the StripSymbolsPass. This should not be done by default in libLTO.dylib...
Nick Kledzik [Fri, 30 May 2008 00:59:13 +0000 (00:59 +0000)]
remove the StripSymbolsPass.  This should not be done by default in libLTO.dylib.  The linker will remove the symbol names if needed after LTO is done

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51722 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove an unused variable.
Dan Gohman [Fri, 30 May 2008 00:56:36 +0000 (00:56 +0000)]
Remove an unused variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51721 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix an error in the comment for APInt::getMinSignedBits.
Dan Gohman [Fri, 30 May 2008 00:46:49 +0000 (00:46 +0000)]
Fix an error in the comment for APInt::getMinSignedBits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51720 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a typo in a comment.
Dan Gohman [Fri, 30 May 2008 00:08:18 +0000 (00:08 +0000)]
Fix a typo in a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51718 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a copy+paste error in a comment.
Dan Gohman [Fri, 30 May 2008 00:02:02 +0000 (00:02 +0000)]
Fix a copy+paste error in a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51717 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix doxygen comment syntax.
Dan Gohman [Fri, 30 May 2008 00:01:36 +0000 (00:01 +0000)]
Fix doxygen comment syntax.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51716 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake the renumbering correct in the face of deleted instructions that have been remov...
Owen Anderson [Thu, 29 May 2008 23:01:22 +0000 (23:01 +0000)]
Make the renumbering correct in the face of deleted instructions that have been removed from the LiveIntervals maps.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51714 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd doxygen comments
Gabor Greif [Thu, 29 May 2008 22:58:33 +0000 (22:58 +0000)]
add doxygen comments

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51712 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUnbreak build.
Bill Wendling [Thu, 29 May 2008 22:02:08 +0000 (22:02 +0000)]
Unbreak build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51709 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove guard, so *each* inclusion will result in a warning
Anton Korobeynikov [Thu, 29 May 2008 21:57:11 +0000 (21:57 +0000)]
Remove guard, so *each* inclusion will result in a warning

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51708 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd patterns for CALL32m and CALL64m. They aren't matched in most
Dan Gohman [Thu, 29 May 2008 21:50:34 +0000 (21:50 +0000)]
Add patterns for CALL32m and CALL64m. They aren't matched in most
cases due to an isel deficiency already noted in
lib/Target/X86/README.txt, but they can be matched in this fold-call.ll
testcase, for example.

This is interesting mainly because it exposes a tricky tblgen bug;
tblgen was incorrectly computing the starting index for variable_ops
in the case of a complex pattern.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51706 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove more iostream header includes. Needed to implement a "FlushStream"
Bill Wendling [Thu, 29 May 2008 21:46:33 +0000 (21:46 +0000)]
Remove more iostream header includes. Needed to implement a "FlushStream"
function to flush a specified std::ostream.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51705 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove <iostream>.
Bill Wendling [Thu, 29 May 2008 21:29:39 +0000 (21:29 +0000)]
Remove <iostream>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51704 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd newline at end of file.
Owen Anderson [Thu, 29 May 2008 21:05:16 +0000 (21:05 +0000)]
Add newline at end of file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51701 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a tblgen problem handling variable_ops in tblgen instruction
Dan Gohman [Thu, 29 May 2008 19:57:41 +0000 (19:57 +0000)]
Fix a tblgen problem handling variable_ops in tblgen instruction
definitions. This adds a new construct, "discard", for indicating
that a named node in the input matching pattern is to be discarded,
instead of corresponding to a node in the output pattern. This
allows tblgen to know where the arguments for the varaible_ops are
supposed to begin.

This fixes "rdar://5791600", whatever that is ;-).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51699 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoconst-ify getOpcode.
Dan Gohman [Thu, 29 May 2008 19:53:46 +0000 (19:53 +0000)]
const-ify getOpcode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51698 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPrune and tidy #includes.
Dan Gohman [Thu, 29 May 2008 19:52:31 +0000 (19:52 +0000)]
Prune and tidy #includes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51697 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoExpand small memmovs using inline code. Set the X86 threshold for expanding
Dan Gohman [Thu, 29 May 2008 19:42:22 +0000 (19:42 +0000)]
Expand small memmovs using inline code. Set the X86 threshold for expanding
memmove to a more plausible value, now that it's actually being used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51696 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFor PR1338: Rename test dirs
Anton Korobeynikov [Thu, 29 May 2008 19:17:15 +0000 (19:17 +0000)]
For PR1338: Rename test dirs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51695 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert part of my last patch that I didn't intend to commit yet.
Owen Anderson [Thu, 29 May 2008 18:35:21 +0000 (18:35 +0000)]
Revert part of my last patch that I didn't intend to commit yet.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51694 91177308-0d34-0410-b5e6-96231b3b80d8