oota-llvm.git
15 years agoFix the name of an argument.
Dan Gohman [Mon, 26 Jan 2009 20:27:11 +0000 (20:27 +0000)]
Fix the name of an argument.

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

15 years agoDuring bittest switch lowering emit shift in the test block, which should (theoretically)
Anton Korobeynikov [Mon, 26 Jan 2009 19:26:01 +0000 (19:26 +0000)]
During bittest switch lowering emit shift in the test block, which should (theoretically)
allow us to generate more efficient code. We don't do this now though :)

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

15 years agoGet rid of a bunch of dead code now that interval reconstruction is enabled.
Owen Anderson [Mon, 26 Jan 2009 19:18:06 +0000 (19:18 +0000)]
Get rid of a bunch of dead code now that interval reconstruction is enabled.

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

15 years agoFix an issue where LiveIntervals was trying to be smart about removing kill
Owen Anderson [Mon, 26 Jan 2009 19:12:06 +0000 (19:12 +0000)]
Fix an issue where LiveIntervals was trying to be smart about removing kill
markers, and ended up foiling the interval reconstruction.

This allows us to turn on reconstruction in the pre alloc splitter, which
fixes a number of miscompilations.

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

15 years agoEnhance logic in X86DAGToDAGISel::PreprocessForRMW which move load inside callseq_sta...
Evan Cheng [Mon, 26 Jan 2009 18:43:34 +0000 (18:43 +0000)]
Enhance logic in X86DAGToDAGISel::PreprocessForRMW which move load inside callseq_start to allow it to be folded into a call. It was not considering the cases where a token factor is between the load and the callseq_start.

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

15 years agoSilence a bogus compiler warning.
Evan Cheng [Mon, 26 Jan 2009 18:33:51 +0000 (18:33 +0000)]
Silence a bogus compiler warning.

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

15 years agoUpdate VS project files.
Steve Naroff [Mon, 26 Jan 2009 18:08:55 +0000 (18:08 +0000)]
Update VS project files.

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

15 years agoFix a bug in BitVector.h. All assignment operations (except the usual
Roman Levenstein [Mon, 26 Jan 2009 11:07:20 +0000 (11:07 +0000)]
Fix a bug in BitVector.h. All assignment operations (except the usual
assignment operator) were returning a copy of the bit vector, instead of a
reference! This old semantics probably did not meet the expectations.
With this patch, chained assignments happen to the right object.

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

15 years agoActually source file has already been uniquified into an id during isel. Eliminate...
Evan Cheng [Mon, 26 Jan 2009 07:53:42 +0000 (07:53 +0000)]
Actually source file has already been uniquified into an id during isel. Eliminate the StringMap.

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

15 years agoAdd data structure to define and track debug location during codegen.
Evan Cheng [Mon, 26 Jan 2009 07:41:49 +0000 (07:41 +0000)]
Add data structure to define and track debug location during codegen.

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

15 years agoLooks like comments were chopped off.
Evan Cheng [Mon, 26 Jan 2009 07:40:13 +0000 (07:40 +0000)]
Looks like comments were chopped off.

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

15 years agoLLVM_SUPPORT_DEBUGINFO_H -> LLVM_ANALYSIS_DEBUGINFO_H since DebugInfo.h is under...
Evan Cheng [Mon, 26 Jan 2009 07:31:20 +0000 (07:31 +0000)]
LLVM_SUPPORT_DEBUGINFO_H -> LLVM_ANALYSIS_DEBUGINFO_H since DebugInfo.h is under Analysis.

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

15 years agoFixed optimization of combining two shuffles where the first shuffle inputs
Mon P Wang [Mon, 26 Jan 2009 04:39:00 +0000 (04:39 +0000)]
Fixed optimization of combining two shuffles where the first shuffle inputs
has a different number of elements than the output.

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

15 years agoTake the next steps in making SDUse more consistent with LLVM Use, and
Dan Gohman [Mon, 26 Jan 2009 04:35:06 +0000 (04:35 +0000)]
Take the next steps in making SDUse more consistent with LLVM Use, and
tidy up SDUse and related code.
 - Replace the operator= member functions with a set method, like
   LLVM Use has, and variants setInitial and setNode, which take
   care up updating use lists, like LLVM Use's does. This simplifies
   code that calls these functions.
 - getSDValue() is renamed to get(), as in LLVM Use, though most
   places can either use the implicit conversion to SDValue or the
   convenience functions instead.
 - Fix some more node vs. value terminology issues.

Also, eliminate the one remaining use of SDOperandPtr, and
SDOperandPtr itself.

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

15 years agoUntabify code.
Scott Michel [Mon, 26 Jan 2009 03:37:41 +0000 (03:37 +0000)]
Untabify code.

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

15 years agoCellSPU:
Scott Michel [Mon, 26 Jan 2009 03:31:40 +0000 (03:31 +0000)]
CellSPU:
- Rename fcmp.ll test to fcmp32.ll, start adding new double tests to fcmp64.ll
- Fix select_bits.ll test
- Capitulate to the DAGCombiner and move i64 constant loads to instruction
  selection (SPUISelDAGtoDAG.cpp).

  <rant>DAGCombiner will insert all kinds of 64-bit optimizations after
  operation legalization occurs and now we have to do most of the work that
  instruction selection should be doing twice (once to determine if v2i64
  build_vector can be handled by SelectCode(), which then runs all of the
  predicates a second time to select the necessary instructions.) But,
  CellSPU is a good citizen.</rant>

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

15 years agoFix a typo
Nate Begeman [Mon, 26 Jan 2009 03:15:54 +0000 (03:15 +0000)]
Fix a typo

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

15 years agoDe-identifying per sabre review
Nate Begeman [Mon, 26 Jan 2009 03:15:31 +0000 (03:15 +0000)]
De-identifying per sabre review

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

15 years agoBuild libLTO on any platform so long as PIC is enabled.
Nick Lewycky [Mon, 26 Jan 2009 03:04:57 +0000 (03:04 +0000)]
Build libLTO on any platform so long as PIC is enabled.

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

15 years agoAdd some documentation for address-space-based access to the segment registers.
Nate Begeman [Mon, 26 Jan 2009 02:54:45 +0000 (02:54 +0000)]
Add some documentation for address-space-based access to the segment registers.

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

15 years agoHandle single-entry phi nodes gracefully in condprop.
Chris Lattner [Mon, 26 Jan 2009 02:18:20 +0000 (02:18 +0000)]
Handle single-entry phi nodes gracefully in condprop.

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

15 years agoFix PR3408 by making a non-obvious assumption very obvious, and
Chris Lattner [Mon, 26 Jan 2009 02:11:30 +0000 (02:11 +0000)]
Fix PR3408 by making a non-obvious assumption very obvious, and
handling the flaw inherent in that assumption.  :)

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

15 years agoMore cleanups and simplifications, no functionality change.
Chris Lattner [Mon, 26 Jan 2009 01:57:01 +0000 (01:57 +0000)]
More cleanups and simplifications, no functionality change.

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

15 years agotidy asserts
Chris Lattner [Mon, 26 Jan 2009 01:38:24 +0000 (01:38 +0000)]
tidy asserts

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

15 years agoMap address space 256 to gs; similar mappings could be supported for the
Nate Begeman [Mon, 26 Jan 2009 01:24:32 +0000 (01:24 +0000)]
Map address space 256 to gs; similar mappings could be supported for the
other x86 segments.  address space 0 is stack/default, 1-255 are reserved for
client use.

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

15 years agoSupport pattern matching various x86 sse shifts.
Nate Begeman [Mon, 26 Jan 2009 00:52:55 +0000 (00:52 +0000)]
Support pattern matching various x86 sse shifts.

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

15 years agosilence a warning when assertions are disabled.
Chris Lattner [Sun, 25 Jan 2009 23:08:00 +0000 (23:08 +0000)]
silence a warning when assertions are disabled.

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

15 years agoshould have removed the + when manually applying a patch!
Torok Edwin [Sun, 25 Jan 2009 20:29:34 +0000 (20:29 +0000)]
should have removed the + when manually applying a patch!

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

15 years agorevert this patch for now, because Codegen does still want to generate SSE code,
Torok Edwin [Sun, 25 Jan 2009 20:21:24 +0000 (20:21 +0000)]
revert this patch for now, because Codegen does still want to generate SSE code,
for example in the case of va-args. XFAIL associated tests.

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

15 years agotestcase for llvm-gcc part of PR3402.
Torok Edwin [Sun, 25 Jan 2009 18:00:06 +0000 (18:00 +0000)]
testcase for llvm-gcc part of PR3402.

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

15 years agoIf user explicitly asks not to use SSE, don't force it. This fixes LLVM part of PR3402.
Torok Edwin [Sun, 25 Jan 2009 17:58:56 +0000 (17:58 +0000)]
If user explicitly asks not to use SSE, don't force it. This fixes LLVM part of PR3402.

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

15 years agoEliminate the loop that searches through each of the operands
Dan Gohman [Sun, 25 Jan 2009 16:29:12 +0000 (16:29 +0000)]
Eliminate the loop that searches through each of the operands
of each use in the SelectionDAG ReplaceAllUses* functions. Thanks
to Chris for spotting this opportunity.

Also, factor out code from all 5 of the ReplaceAllUses* functions
into AddNonLeafNodeToCSEMaps, which is now renamed
AddModifiedNodeToCSEMaps to more accurately reflect its purpose.

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

15 years agoWhitespace tidiments.
Dan Gohman [Sun, 25 Jan 2009 16:21:38 +0000 (16:21 +0000)]
Whitespace tidiments.

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

15 years agoMove the N->use_empty() assert from DeleteNode to
Dan Gohman [Sun, 25 Jan 2009 16:20:37 +0000 (16:20 +0000)]
Move the N->use_empty() assert from DeleteNode to
DeleteNodeNotInCSEMaps, since DeleteNode just calls
DeleteNodeNotInCSEMaps.

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

15 years agoReality-check the FAQ entry for "Can I use LLVM to convert C++ to C?"
Dan Gohman [Sun, 25 Jan 2009 16:04:50 +0000 (16:04 +0000)]
Reality-check the FAQ entry for "Can I use LLVM to convert C++ to C?"

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

15 years agoStart generating arbitrary precision integer SCEVs. This removes the temporary
Nick Lewycky [Sun, 25 Jan 2009 08:16:27 +0000 (08:16 +0000)]
Start generating arbitrary precision integer SCEVs. This removes the temporary
code that rounded up and capped the size.

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

15 years agoActually run the test in this directory.
Nick Lewycky [Sun, 25 Jan 2009 08:05:07 +0000 (08:05 +0000)]
Actually run the test in this directory.

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

15 years agoThe function that does nothing but call malloc is noalias return.
Nick Lewycky [Sun, 25 Jan 2009 07:59:57 +0000 (07:59 +0000)]
The function that does nothing but call malloc is noalias return.

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

15 years agoPrivate linkage support for PPC / Darwin.
Evan Cheng [Sun, 25 Jan 2009 06:32:01 +0000 (06:32 +0000)]
Private linkage support for PPC / Darwin.

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

15 years agoTeach 2addr pass to be do more commuting. If both uses of a two-address instruction...
Evan Cheng [Sun, 25 Jan 2009 03:53:59 +0000 (03:53 +0000)]
Teach 2addr pass to be do more commuting. If both uses of a two-address instruction are killed, but the first operand has a use before and after the def, commute if the second operand does not suffer from the same issue.
%reg1028<def> = EXTRACT_SUBREG %reg1027<kill>, 1
%reg1029<def> = MOV8rr %reg1028
%reg1029<def> = SHR8ri %reg1029, 7, %EFLAGS<imp-def,dead>
insert => %reg1030<def> = MOV8rr %reg1028
%reg1030<def> = ADD8rr %reg1028<kill>, %reg1029<kill>, %EFLAGS<imp-def,dead>

In this case, it might not be possible to coalesce the second MOV8rr
instruction if the first one is coalesced. So it would be profitable to
commute it:
%reg1028<def> = EXTRACT_SUBREG %reg1027<kill>, 1
%reg1029<def> = MOV8rr %reg1028
%reg1029<def> = SHR8ri %reg1029, 7, %EFLAGS<imp-def,dead>
insert => %reg1030<def> = MOV8rr %reg1029
%reg1030<def> = ADD8rr %reg1029<kill>, %reg1028<kill>, %EFLAGS<imp-def,dead>

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

15 years agoFix an indent and a typo.
Nate Begeman [Sat, 24 Jan 2009 22:12:48 +0000 (22:12 +0000)]
Fix an indent and a typo.

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

15 years agoRevert previous change; even this mild and clearly
Dale Johannesen [Sat, 24 Jan 2009 21:49:34 +0000 (21:49 +0000)]
Revert previous change; even this mild and clearly
more accurate change loses more than it gains on
benchmarks.

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

15 years agoadd note about possible GEP improvement with fields of size 0.
Torok Edwin [Sat, 24 Jan 2009 19:30:25 +0000 (19:30 +0000)]
add note about possible GEP improvement with fields of size 0.

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

15 years agoAdd a PR comment to this test.
Dan Gohman [Sat, 24 Jan 2009 17:32:54 +0000 (17:32 +0000)]
Add a PR comment to this test.

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

15 years agotestcase for PR3381.
Torok Edwin [Sat, 24 Jan 2009 17:16:04 +0000 (17:16 +0000)]
testcase for PR3381.
Also it was an empty struct, not a void after all.

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

15 years agoAdd more documentation mentioning the limitations due to PR2660.
Dan Gohman [Sat, 24 Jan 2009 15:58:40 +0000 (15:58 +0000)]
Add more documentation mentioning the limitations due to PR2660.

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

15 years agovoid* is represented as pointer to empty struct {}.
Torok Edwin [Sat, 24 Jan 2009 11:30:49 +0000 (11:30 +0000)]
void* is represented as pointer to empty struct {}.
Thus we need to check whether the struct is empty before trying to index into
it. This fixes PR3381.

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

15 years agoSome cleanups. No functional changes.
Owen Anderson [Sat, 24 Jan 2009 10:07:43 +0000 (10:07 +0000)]
Some cleanups.  No functional changes.

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

15 years agoImprove the inlining cost function a bit.
Dale Johannesen [Sat, 24 Jan 2009 01:27:33 +0000 (01:27 +0000)]
Improve the inlining cost function a bit.
Little practical effect.

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

15 years agoMake InstCombineStoreToCast handle aggregates more aggressively,
Chris Lattner [Sat, 24 Jan 2009 01:00:13 +0000 (01:00 +0000)]
Make InstCombineStoreToCast handle aggregates more aggressively,
handling the case in Transforms/InstCombine/cast-store-gep.ll, which
is a heavily reduced testcase from Clang on x86-64.

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

15 years agoPerform optional clang building.
Mike Stump [Sat, 24 Jan 2009 00:00:41 +0000 (00:00 +0000)]
Perform optional clang building.

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

15 years agoRefactor code. No functionality change.
Evan Cheng [Fri, 23 Jan 2009 23:27:33 +0000 (23:27 +0000)]
Refactor code. No functionality change.

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

15 years agoIntroduce two DWARF attribute extentions DW_AT_APPLE_optimized, DW_AT_APPLE_flags.
Devang Patel [Fri, 23 Jan 2009 22:33:47 +0000 (22:33 +0000)]
Introduce two DWARF attribute extentions DW_AT_APPLE_optimized, DW_AT_APPLE_flags.

DW_AT_APPLE_optimized flag is set when a compile_unit is optimized. The debugger takes advantage of this information some way.

DW_AT_APPLE_flags encodes command line options when certain env. variable is set. This is used by build engineers to track various gcc command lines used by by  a project, irrespective of whether the project used makefile, Xcode or something else.

llvm-gcc patch is next.

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

15 years agohopefully address PR3379 by making the P modifier work in x86 inline asm.
Chris Lattner [Fri, 23 Jan 2009 22:33:40 +0000 (22:33 +0000)]
hopefully address PR3379 by making the P modifier work in x86 inline asm.

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

15 years agoFix test case. Use valid file name and directory in global variable's debug info...
Devang Patel [Fri, 23 Jan 2009 21:54:18 +0000 (21:54 +0000)]
Fix test case. Use valid file name and directory in global variable's debug info entry.

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

15 years agouse CallSite::isCalle instead of slow getOperandNo
Gabor Greif [Fri, 23 Jan 2009 21:17:04 +0000 (21:17 +0000)]
use CallSite::isCalle instead of slow getOperandNo

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

15 years agoSimplify the logic of getting hold of a PHI predecessor block.
Gabor Greif [Fri, 23 Jan 2009 19:40:15 +0000 (19:40 +0000)]
Simplify the logic of getting hold of a PHI predecessor block.
There is now a direct way from value-use-iterator to incoming block in PHINode's API.
This way we avoid the iterator->index->iterator trip, and especially the costly
getOperandNo() invocation. Additionally there is now an assertion that the iterator
really refers to one of the PHI's Uses.

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

15 years agoAdd support for deleting a module provider from a JIT in such a way that it does...
Nate Begeman [Fri, 23 Jan 2009 19:27:28 +0000 (19:27 +0000)]
Add support for deleting a module provider from a JIT in such a way that it does not cause the owned module to be fully materialized.

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

15 years agoEmpty DIType represents void. In this case no need to construct any type DIE.
Devang Patel [Fri, 23 Jan 2009 19:13:31 +0000 (19:13 +0000)]
Empty DIType represents void. In  this case no need to construct any type DIE.

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

15 years agoFold x-0 to x in unsafe-fp-math mode. This comes up in the
Dan Gohman [Fri, 23 Jan 2009 19:10:37 +0000 (19:10 +0000)]
Fold x-0 to x in unsafe-fp-math mode. This comes up in the
testcase from PR3376, and in fact is sufficient to completely
avoid the problem in that testcase.

There's an underlying problem though; TLI.isOperationLegal
considers Custom to be Legal, which might be ok in some
cases, but that's what DAGCombiner is using in many places
to test if something is legal when LegalOperations is true.
When DAGCombiner is running after legalize, this isn't
sufficient. I'll address this in a separate commit.

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

15 years agoPatch to build llvm with srcdir != objdir from
Duncan Sands [Fri, 23 Jan 2009 08:42:38 +0000 (08:42 +0000)]
Patch to build llvm with srcdir != objdir from
llvm-top.  By Michael Schuerig, with some small
tweaks to make the "don't configure if already
configured" logic work.

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

15 years agofix two more cases where we could let the NLPDI cache get unsorted.
Chris Lattner [Fri, 23 Jan 2009 07:12:16 +0000 (07:12 +0000)]
fix two more cases where we could let the NLPDI cache get unsorted.
With this, sqlite3 now passes.

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

15 years agoUnconditionally reset 'cache' to zero, even if we don't need to resort it.
Chris Lattner [Fri, 23 Jan 2009 06:48:41 +0000 (06:48 +0000)]
Unconditionally reset 'cache' to zero, even if we don't need to resort it.
This avoids using a dangling pointer.

Reset NumSortedEntries after restoring Cache to avoid extraneous sorts.
This fixes the reduced sqlite3 testcase, but apparently not the whole app.

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

15 years agoOnly check if coalescing is worthwhile when the result is targeting a more restrictiv...
Evan Cheng [Fri, 23 Jan 2009 05:48:59 +0000 (05:48 +0000)]
Only check if coalescing is worthwhile when the result is targeting a more restrictive register class.

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

15 years agoUpdate test to reflect command line option name change.
Evan Cheng [Fri, 23 Jan 2009 05:45:31 +0000 (05:45 +0000)]
Update test to reflect command line option name change.

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

15 years agoStage two of fixing pre-alloc-splitting's code size issues: filter out restores that...
Owen Anderson [Fri, 23 Jan 2009 03:28:53 +0000 (03:28 +0000)]
Stage two of fixing pre-alloc-splitting's code size issues: filter out restores that are just
going to be re-spilled again.

This also helps performance.  Pre-alloc-splitting now seems to be an overall win on SPEC.

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

15 years agoCross register class coalescing. Not yet enabled.
Evan Cheng [Fri, 23 Jan 2009 02:15:19 +0000 (02:15 +0000)]
Cross register class coalescing. Not yet enabled.

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

15 years agoCode did not follow associated comment. not a good idea.
Devang Patel [Fri, 23 Jan 2009 01:25:58 +0000 (01:25 +0000)]
Code did not follow associated comment. not a good idea.

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

15 years agoSet appropriate tag for the composite type.
Devang Patel [Fri, 23 Jan 2009 01:19:09 +0000 (01:19 +0000)]
Set appropriate tag for the composite type.

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

15 years agoa minor tweak to my previous patch, handle the invalidation case
Chris Lattner [Fri, 23 Jan 2009 00:27:03 +0000 (00:27 +0000)]
a minor tweak to my previous patch, handle the invalidation case
when there are multiple iterations of the loop.  This fixes PR3375.

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

15 years agoAdd an initial pass at dead spill/restore removal for pre alloc splitting.
Owen Anderson [Fri, 23 Jan 2009 00:23:32 +0000 (00:23 +0000)]
Add an initial pass at dead spill/restore removal for pre alloc splitting.

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

15 years agodo not sign extend characters input to isprint. This improves
Chris Lattner [Thu, 22 Jan 2009 23:38:45 +0000 (23:38 +0000)]
do not sign extend characters input to isprint.  This improves
compatibility with VC++.  Patch by Max Burke!

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

15 years agoHandful of fixes to the VC project files.
Steve Naroff [Thu, 22 Jan 2009 23:05:37 +0000 (23:05 +0000)]
Handful of fixes to the VC project files.

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

15 years agoFix a minor bug in DAGCombiner's folding of SELECT. Folding "select C, 0, 1"
Bob Wilson [Thu, 22 Jan 2009 22:05:48 +0000 (22:05 +0000)]
Fix a minor bug in DAGCombiner's folding of SELECT.  Folding "select C, 0, 1"
to "C ^ 1" is only valid when C is known to be either 0 or 1.  Most of the
similar foldings in this function only handle "i1" types, but this one appears
intentionally written to handle larger integer types.  If C has an integer
type larger than "i1", this needs to check if the high bits of a boolean
are known to be zero.  I also changed the comment to describe this folding as
"C ^ 1" instead of "~C", since that is what the code does and since the latter
would only be valid for "i1" types.  The good news is that most LLVM targets
use TargetLowering::ZeroOrOneBooleanContent so this change will not disable
the optimization; the bad news is that I've been unable to come up with a
testcase to demonstrate the problem.

I have also removed a "FIXME" comment for folding "select C, X, 0" to "C & X",
since the code looks correct to me.  It could be made more aggressive by not
limiting the type to "i1", but that would then require checking for
TargetLowering::ZeroOrNegativeOneBooleanContent.  Similar changes could be
done for the other SELECT foldings, but it was decided to be not worth the
trouble and complexity (see e.g., r44663).

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

15 years agoDon't create ISD::FNEG nodes after legalize if they aren't legal.
Dan Gohman [Thu, 22 Jan 2009 21:58:43 +0000 (21:58 +0000)]
Don't create ISD::FNEG nodes after legalize if they aren't legal.

Simplify x+0 to x in unsafe-fp-math mode. This avoids a bunch of
redundant work in many cases, because in unsafe-fp-math mode,
ISD::FADD with a constant is considered free to negate, so the
DAGCombiner often negates x+0 to -0-x thinking it's free, when
in reality the end result is -x, which is more expensive than x.

Also, combine x*0 to 0.

This fixes PR3374.

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

15 years agointroduce a useful abstraction to find out if a Use is in the call position of an...
Gabor Greif [Thu, 22 Jan 2009 21:35:57 +0000 (21:35 +0000)]
introduce a useful abstraction to find out if a Use is in the call position of an instruction

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

15 years agoRegenerated configure after backing out 62553 and r62616.
Tanya Lattner [Thu, 22 Jan 2009 20:11:17 +0000 (20:11 +0000)]
Regenerated configure after backing out 62553 and r62616.

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

15 years agoRevert r62553 and r62616 due to issues with portability.
Tanya Lattner [Thu, 22 Jan 2009 20:09:20 +0000 (20:09 +0000)]
Revert r62553 and r62616 due to issues with portability.

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

15 years agorename methods in System/Host to be more consistent.
Chris Lattner [Thu, 22 Jan 2009 19:53:00 +0000 (19:53 +0000)]
rename methods in System/Host to be more consistent.

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

15 years agoDo not use buggy llvm-gcc to generate testcases.
Devang Patel [Thu, 22 Jan 2009 18:28:11 +0000 (18:28 +0000)]
Do not use buggy llvm-gcc to generate testcases.

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

15 years agoAdd SelectionDAG::getNOT method to construct bitwise NOT operations,
Bob Wilson [Thu, 22 Jan 2009 17:39:32 +0000 (17:39 +0000)]
Add SelectionDAG::getNOT method to construct bitwise NOT operations,
corresponding to the "not" and "vnot" PatFrags.  Use the new method
in some places where it seems appropriate.

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

15 years agoRemove no-longer relevant comment. Pointed out
Duncan Sands [Thu, 22 Jan 2009 15:37:29 +0000 (15:37 +0000)]
Remove no-longer relevant comment.  Pointed out
by Gabor.

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

15 years agoThis passes on linux.
Duncan Sands [Thu, 22 Jan 2009 15:07:15 +0000 (15:07 +0000)]
This passes on linux.

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

15 years agoFew targets like the tiny little PIC16 have only 16-bit pointers.
Sanjiv Gupta [Thu, 22 Jan 2009 10:14:21 +0000 (10:14 +0000)]
Few targets like the tiny little PIC16 have only 16-bit pointers.

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

15 years agoEliminate a couple of fields from TargetRegisterClass: SubRegClasses and SuperRegClas...
Evan Cheng [Thu, 22 Jan 2009 09:10:11 +0000 (09:10 +0000)]
Eliminate a couple of fields from TargetRegisterClass: SubRegClasses and SuperRegClasses. These are not necessary. Also eliminate getSubRegisterRegClass and getSuperRegisterRegClass. These are slow and their results can change if register file names change. Just use TargetLowering::getRegClassFor() to get the right TargetRegisterClass instead.

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

15 years agofix a typo
Chris Lattner [Thu, 22 Jan 2009 07:21:55 +0000 (07:21 +0000)]
fix a typo

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

15 years agoadd a note
Chris Lattner [Thu, 22 Jan 2009 07:16:03 +0000 (07:16 +0000)]
add a note

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

15 years agofix a testcase.
Chris Lattner [Thu, 22 Jan 2009 07:08:58 +0000 (07:08 +0000)]
fix a testcase.

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

15 years agoFix PR3358, a really nasty bug where recursive phi translated
Chris Lattner [Thu, 22 Jan 2009 07:04:01 +0000 (07:04 +0000)]
Fix PR3358, a really nasty bug where recursive phi translated
analyses could be run without the caches properly sorted.  This
can fix all sorts of weirdness.  Many thanks to Bill for coming
up with the 'issorted' verification idea.

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

15 years agoBump to 2.6svn.
Tanya Lattner [Thu, 22 Jan 2009 05:17:59 +0000 (05:17 +0000)]
Bump to 2.6svn.
Regenerate configure (last regen was with the wrong version).

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

15 years agoMake tblgen more portable, allowing it to build with ICC.
Chris Lattner [Thu, 22 Jan 2009 05:10:16 +0000 (05:10 +0000)]
Make tblgen more portable, allowing it to build with ICC.
Patch by Robert Zeh!

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

15 years agoDon't create .dir files in installation directories. Switch to using
Mike Stump [Thu, 22 Jan 2009 03:24:22 +0000 (03:24 +0000)]
Don't create .dir files in installation directories.  Switch to using
order-only dependancies for installation directories.

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

15 years agoThe operator<() and operator>() were reversing their tests. Have the test the correct...
Bill Wendling [Thu, 22 Jan 2009 03:05:10 +0000 (03:05 +0000)]
The operator<() and operator>() were reversing their tests. Have the test the correct way.

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

15 years agoGet rid of warning about implicit 64-to-32 bit conversions.
Bill Wendling [Thu, 22 Jan 2009 02:10:33 +0000 (02:10 +0000)]
Get rid of warning about implicit 64-to-32 bit conversions.

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

15 years agoAdd a few more notes about LLVM IR features that codegen doesn't
Dan Gohman [Thu, 22 Jan 2009 01:39:38 +0000 (01:39 +0000)]
Add a few more notes about LLVM IR features that codegen doesn't
yet support.

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

15 years agoCMake: Tests PERL availability with PERL_EXECUTABLE variable.
Oscar Fuentes [Thu, 22 Jan 2009 01:20:31 +0000 (01:20 +0000)]
CMake: Tests PERL availability with PERL_EXECUTABLE variable.

On MSVC 64bits, does not put underscore before the symbol name on the
/INCLUDE linker parameter.

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

15 years agoAdd explicit this-> (to make the VS compiler happy).
Steve Naroff [Wed, 21 Jan 2009 23:49:23 +0000 (23:49 +0000)]
Add explicit this-> (to make the VS compiler happy).

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

15 years agoRecognize inline asm for bswap on x86-64 GLIBC. This allows it
Dan Gohman [Wed, 21 Jan 2009 23:40:54 +0000 (23:40 +0000)]
Recognize inline asm for bswap on x86-64 GLIBC. This allows it
to be supported in the JIT.

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

15 years agoFix ilist two-phase name lookup
Douglas Gregor [Wed, 21 Jan 2009 22:38:44 +0000 (22:38 +0000)]
Fix ilist two-phase name lookup

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

15 years agoFix a missing word.
Dan Gohman [Wed, 21 Jan 2009 21:54:44 +0000 (21:54 +0000)]
Fix a missing word.

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