Commit Graph

31410 Commits

Author SHA1 Message Date
Reid Spencer 2d6db76bda Avoid a useless temporary constrution.
llvm-svn: 35747
2007-04-07 19:51:45 +00:00
Reid Spencer 43340fee01 For PR1291:
Change to use PathWithStatus

llvm-svn: 35746
2007-04-07 19:50:21 +00:00
Reid Spencer e061303a9c Update for PathWithStatus
llvm-svn: 35745
2007-04-07 19:49:35 +00:00
Reid Spencer 95b43e986d Fix another PathWithStatus issue.
llvm-svn: 35744
2007-04-07 19:45:30 +00:00
Reid Spencer 21b76a9b99 For PR1291:
Change uses of sys::Path class to sys::PathWithStatus in those places where
the file status information is needed.

llvm-svn: 35743
2007-04-07 18:53:16 +00:00
Reid Spencer ceeb918dd1 For PR1291:
Implement the PathWithStatus class and its use throughout lib/System.

llvm-svn: 35742
2007-04-07 18:52:17 +00:00
Owen Anderson f7ebea1b9f Add DomSet back, and revert the changes to LoopSimplify. Apparently the
ETForest updating mechanisms don't work as I thought they did.  These changes
will be reapplied once the issue is worked out.

llvm-svn: 35741
2007-04-07 18:23:27 +00:00
Zhou Sheng 2852d99a48 Eliminate unnecessary APInt construction.
llvm-svn: 35740
2007-04-07 17:48:27 +00:00
Duncan Sands 24334a3561 Rephrase linker explanation.
llvm-svn: 35739
2007-04-07 17:43:25 +00:00
Zhou Sheng c0297896aa Make APInt variables do the computation stuffs instead of
ConstantExpr::getXX if possible.

llvm-svn: 35738
2007-04-07 17:40:57 +00:00
Zhou Sheng 1459c73481 Eliminate unnecessary zext/trunc stuffs.
llvm-svn: 35737
2007-04-07 17:12:38 +00:00
Reid Spencer 25603318ff Regenerate.
llvm-svn: 35736
2007-04-07 16:14:01 +00:00
Reid Spencer 33766f8eba For PR1312:
For the short CALL/INVOKE syntax, the signedness of the result type is two
extractions away from the type argument because its a POINTER to function
type, not a function type.

llvm-svn: 35735
2007-04-07 16:10:37 +00:00
Nick Lewycky d4f51a8ae3 Add support for cast instructions.
llvm-svn: 35734
2007-04-07 15:48:32 +00:00
Nick Lewycky b89804f246 Add signExtend to ConstantRange, to complement zeroExtend and truncate.
llvm-svn: 35733
2007-04-07 15:41:33 +00:00
Jeff Cohen d3f4283b40 Unbreak VC++ build.
llvm-svn: 35732
2007-04-07 14:31:16 +00:00
Owen Anderson 8763ba1b88 Completely purge DomSet. This is the (hopefully) final patch for PR1171.
llvm-svn: 35731
2007-04-07 07:17:27 +00:00
Owen Anderson 706e97049d Completely purge DomSet from LoopSimplify. This is part of the
continuing work on PR1171.

llvm-svn: 35730
2007-04-07 06:56:47 +00:00
Owen Anderson d03a646f06 BreakCriticalEdges does still preserve DominatorTree.
llvm-svn: 35729
2007-04-07 05:57:09 +00:00
Owen Anderson b39d9ca902 Expunge DomSet from BreakCriticalEdges. This is part of the continuing
work for PR 1171.

llvm-svn: 35728
2007-04-07 05:49:29 +00:00
Chris Lattner 0e1c1d4ae3 Fix a bug in my earlier commit which exposed positional options backwards.
This fixes llvm-ar.

llvm-svn: 35727
2007-04-07 05:38:53 +00:00
Owen Anderson f095bf3ac4 Expunge DomSet from CodeExtractor. This is part of the continuing work
on PR1171.

llvm-svn: 35726
2007-04-07 05:31:27 +00:00
Reid Spencer beeeeb1428 Terminate some lines that need to be.
llvm-svn: 35725
2007-04-07 05:20:07 +00:00
Nick Lewycky 93f541057b Support NE inequality in ValueRanges.
llvm-svn: 35724
2007-04-07 04:49:12 +00:00
Owen Anderson 1a290bbddf Expunge DomSet from LoadValueNumbering. This is part of the continuing
work on PR1171.

llvm-svn: 35723
2007-04-07 04:43:07 +00:00
Chris Lattner 45c0dce868 add loop rot
llvm-svn: 35722
2007-04-07 04:43:02 +00:00
Reid Spencer 203524fe05 Reinstate the SVN capability without requiring Date::Parse. As before the
SVN Repository is only used if requested with -usesvn option otherwise it
uses CVS.

llvm-svn: 35721
2007-04-07 04:41:16 +00:00
Owen Anderson 910419596e Expunge a bunch of uses of DomSet from LoopSimplify. Many more remain.
This is the beginning of work for PR1171.

llvm-svn: 35720
2007-04-07 04:37:14 +00:00
Nick Lewycky 3bb6de85d1 Cleanup. Refactor out the applying of value ranges to its own method.
llvm-svn: 35719
2007-04-07 03:36:51 +00:00
Nick Lewycky 12d44abe0f Use TargetData to find the size of a type.
llvm-svn: 35718
2007-04-07 03:16:12 +00:00
Nick Lewycky eeb01b41ef Strengthen icmp snuggling by doing 'compare-or-equal-to' to 'compare'
first and then range testing second.

llvm-svn: 35715
2007-04-07 02:30:14 +00:00
Devang Patel f42389ffe5 Add loop rotation pass.
llvm-svn: 35714
2007-04-07 01:25:15 +00:00
Chris Lattner 0f1509511e fix a miscompilation in printf optimizer.
llvm-svn: 35713
2007-04-07 01:18:36 +00:00
Chris Lattner 6a36d636e9 trunc to bool no longer compares against zero
llvm-svn: 35712
2007-04-07 01:03:46 +00:00
Chris Lattner e8829aa9dd cleanups for strlen optimizer
llvm-svn: 35711
2007-04-07 01:02:00 +00:00
Chris Lattner 485b6415b1 Introduce a new ReplaceCallWith method, which simplifies a lot of code.
llvm-svn: 35710
2007-04-07 00:42:32 +00:00
Chris Lattner 6a6c1f1c30 fixes for strcpy optimizer
llvm-svn: 35709
2007-04-07 00:26:18 +00:00
Chris Lattner f9ee647e86 Fix bugs in strncmp.
llvm-svn: 35708
2007-04-07 00:06:57 +00:00
Chris Lattner c9ccc30212 fix 3 miscompilations and several compielr crashes in strcmp optimizer.
llvm-svn: 35707
2007-04-07 00:01:51 +00:00
Chris Lattner 39f0bb9670 Fix several nasty bugs in the strchr optimizer, this fixes
SimplifyLibCalls/2007-04-06-strchr-miscompile.ll and PR1307

llvm-svn: 35706
2007-04-06 23:38:55 +00:00
Chris Lattner 3dc477d5e3 testcase for PR1307
llvm-svn: 35705
2007-04-06 23:36:59 +00:00
Chris Lattner 56b7fc7768 clean up strcat optimizer, no functionality change.
llvm-svn: 35704
2007-04-06 22:59:33 +00:00
Chris Lattner 9b2b8abd20 rename getConstantStringLength -> GetConstantStringInfo. Make it return
the start index of the array as well as the length.  No functionality change.

llvm-svn: 35703
2007-04-06 22:54:17 +00:00
Jeff Cohen 65e003be63 Track new header file.
llvm-svn: 35702
2007-04-06 22:30:07 +00:00
Chris Lattner 5247f60d20 rearchitect the registration mechanism used by the command line option stuff.
This dramatically reduce the amount of memory allocated by the commandline stuff
at static init time, changing it to build local data structures when ParseCommandLineOptions
is called.  In a dummy empty program that links some llvm libraries, this reduces
the number of malloc'd bytes from 4864 to 3360 on entry to main.  Most of that
memory is now allocated by non-commandline related stuff.

llvm-svn: 35701
2007-04-06 21:06:55 +00:00
Chris Lattner 3dbe65f80a implement Transforms/InstCombine/malloc2.ll and PR1313
llvm-svn: 35700
2007-04-06 18:57:34 +00:00
Chris Lattner 992b451e33 new testcase, update old one.
llvm-svn: 35699
2007-04-06 18:56:54 +00:00
Chris Lattner d31e5155be Switch some vectors to smallvectors. This reduces amount of malloc'd
memory that occurs before main starts from 5104 to 4864 bytes with a dummy
example app.

llvm-svn: 35698
2007-04-06 18:36:18 +00:00
Chris Lattner 7bbcd122db Eliminate unneeded virtual methods
llvm-svn: 35697
2007-04-06 18:06:27 +00:00
Chris Lattner 1c741e95d3 minor comment fix
llvm-svn: 35696
2007-04-06 17:47:14 +00:00
Reid Spencer 8d529a18f4 For PR1209:
Implement Type class's ContainedTys without using a std::vector.

llvm-svn: 35693
2007-04-06 02:02:20 +00:00
Reid Spencer 91b273ae39 XFAIL this test for now. It will be a while before I can implement this
intrinsic properly in SDISel.

llvm-svn: 35692
2007-04-05 22:57:45 +00:00
Chris Lattner 91e66dc136 eliminate a virtual method
llvm-svn: 35691
2007-04-05 22:21:39 +00:00
Chris Lattner 2031b02faf remove the dead removeArgument method, rename Options to OptionsMap.
llvm-svn: 35690
2007-04-05 21:58:17 +00:00
Chris Lattner 1a9a760318 Fix Transforms/GlobalOpt/2007-04-05-Crash.ll
llvm-svn: 35689
2007-04-05 21:09:42 +00:00
Chris Lattner cf1f986099 new testcase that crashes globalopt
llvm-svn: 35688
2007-04-05 21:09:29 +00:00
Dale Johannesen 0a3d673b4a testcase for padding before zero-length fields.
llvm-svn: 35687
2007-04-05 19:05:43 +00:00
Devang Patel 9feae5c4d8 New tests for Packed structs.
llvm-svn: 35686
2007-04-05 17:14:21 +00:00
Devang Patel bc09c71159 New tests for Packed structs.
llvm-svn: 35685
2007-04-05 17:07:48 +00:00
Chris Lattner c7de6e0a75 run a late dce pass to clean up extra cruft.
llvm-svn: 35684
2007-04-05 16:50:20 +00:00
Anton Korobeynikov 506d8db8a4 Fix test
llvm-svn: 35683
2007-04-05 16:43:09 +00:00
Chris Lattner 9df6baa772 Add a helper class (APSInt) which can represent an APInt along with sign
information.  This is useful when a value does have a sign associated with
it.  This shouldn't be used generally in LLVM for mid-level optimizer stuff.

llvm-svn: 35681
2007-04-05 05:20:11 +00:00
Chris Lattner 108083edff Use a worklist-driven algorithm instead of a recursive one.
llvm-svn: 35680
2007-04-05 01:27:02 +00:00
Reid Spencer 85460acfbf Change the bit_part_select (non)implementation from "return 0" to abort.
llvm-svn: 35679
2007-04-05 01:20:18 +00:00
Reid Spencer cce90f55ed Implement the llvm.bit.part_select.iN.iN.iN overloaded intrinsic.
llvm-svn: 35678
2007-04-04 23:48:25 +00:00
Reid Spencer 9797fee9a1 Ignore some things generated by bugpoint.
llvm-svn: 35677
2007-04-04 22:47:38 +00:00
Lauro Ramos Venancio 6db5eb028c Fix release build.
llvm-svn: 35676
2007-04-04 22:13:39 +00:00
Jeff Cohen b4470fb0bf Fix some FreeBSD/amd64 regressions.
llvm-svn: 35675
2007-04-04 22:07:44 +00:00
Reid Spencer e9f516384d Squelch a warning about mismatch between sign of constant and sign of return
type.

llvm-svn: 35674
2007-04-04 22:07:24 +00:00
Anton Korobeynikov 029ea7ee74 Fix test
llvm-svn: 35673
2007-04-04 21:28:36 +00:00
Anton Korobeynikov 915e61736b Properly emit range comparisons for switch cases, where neighbour cases
go to the same destination. Now we're producing really good code for
switch-lower-feature.ll testcase

llvm-svn: 35672
2007-04-04 21:14:49 +00:00
Jeff Cohen 9da1cde86c Any add is wrong, regardless of type.
llvm-svn: 35671
2007-04-04 20:40:44 +00:00
Jeff Cohen 62c300a415 Get it right...
llvm-svn: 35670
2007-04-04 20:35:31 +00:00
Dale Johannesen 9234629e60 Test for transformConstExprCastCall fix.
llvm-svn: 35669
2007-04-04 19:18:16 +00:00
Dale Johannesen 7c2001d014 Prevent transformConstExprCastCall from generating conversions that assert
elsewhere.

llvm-svn: 35668
2007-04-04 19:16:42 +00:00
Reid Spencer edf61160b1 Remove the part_set intrinsic. It won't get implemented as an intrinsic.
llvm-svn: 35667
2007-04-04 19:15:59 +00:00
Chris Lattner c770a0273d stringmap memory managed with malloc now
llvm-svn: 35666
2007-04-04 17:24:28 +00:00
Jeff Cohen 5a1c750f31 Fix 2007-04-04-BadFoldBitcastIntoMalloc.ll
llvm-svn: 35665
2007-04-04 16:58:57 +00:00
Jeff Cohen 6f98cd3710 Add new test.
llvm-svn: 35664
2007-04-04 16:11:23 +00:00
Evan Cheng 8f61b79d60 Better still.
llvm-svn: 35663
2007-04-04 08:49:40 +00:00
Evan Cheng 06df995e9f Fix test case.
llvm-svn: 35662
2007-04-04 07:41:33 +00:00
Evan Cheng ee06655d6b These got better.
llvm-svn: 35661
2007-04-04 07:41:15 +00:00
Evan Cheng 8be98c1572 Re-materialize all loads from fixed stack slots.
llvm-svn: 35660
2007-04-04 07:40:01 +00:00
Evan Cheng 44a28f7d77 Add isFixedObjectIndex. It returns true if the stack slot index is for a fixed stack object.
llvm-svn: 35659
2007-04-04 07:38:25 +00:00
Evan Cheng 2bf2aadd9a Trivially re-materializable instructions have spill weights that are half of what it would be otherwise.
llvm-svn: 35658
2007-04-04 07:04:55 +00:00
Reid Spencer 12e2843475 Revert this until the Date::Parse module can be installed on the nightly
testers.

llvm-svn: 35657
2007-04-04 06:59:36 +00:00
Reid Spencer d1b53f538d For PR1302:
Use local variable names that match the function parameter name that it
is passed to so the code is more clear, to wit: is_bytecode -> is_native

llvm-svn: 35656
2007-04-04 06:44:18 +00:00
Duncan Sands f01a47c93c Fix comment.
llvm-svn: 35655
2007-04-04 06:42:45 +00:00
Reid Spencer d7799fd17d For PR1302:
Rename LinkItems as NativeLinkItems since it is filled out by the Linker
library to contain only those items deemed to be native.

llvm-svn: 35654
2007-04-04 06:34:22 +00:00
Reid Spencer a2c415526c For PR1302:
Implement file tests for both LinkInLibrary and LinkInFile to determine if
the file is native. Don't generate warnings if the file is native.

llvm-svn: 35653
2007-04-04 06:33:17 +00:00
Reid Spencer 031fb8d4dc Make the LinkInFile and LinkInLibrary both return an indication of whether
the file was found to be a native library (and thus not linked by these
functions).

llvm-svn: 35652
2007-04-04 06:32:01 +00:00
Reid Spencer e9d794e7b5 For PR1302:
Adjust useage of sys::Path::FileType for new enumerator names.

llvm-svn: 35651
2007-04-04 06:31:04 +00:00
Reid Spencer 4ef4c46c35 For PR1302:
Implement recognition of COFF, ELF and Mach-O object/shared lib files.

llvm-svn: 35650
2007-04-04 06:30:26 +00:00
Reid Spencer 6d211ab8ed For PR1302:
Make the FileType enumerators more readable and add COFF, ELF and Mach-O.

llvm-svn: 35649
2007-04-04 06:29:49 +00:00
Chris Lattner e7cc7c825b trivial optimization
llvm-svn: 35648
2007-04-04 06:18:21 +00:00
Reid Spencer 91fd109d6b Appease Chris' pedantic streak.
llvm-svn: 35647
2007-04-04 05:46:04 +00:00
Reid Spencer ca5fdf3b1e Fix links to intrinsic functions outside LangRef.html
llvm-svn: 35646
2007-04-04 04:14:31 +00:00
Reid Spencer 96a5f02392 Remove intrinsics that we will not be implementing.
Fix the anchor names of intrinsics to all be int_ so as to distinguish
them from the i_ prefix reserved for instructions.

llvm-svn: 35645
2007-04-04 02:42:35 +00:00
Chris Lattner adf83a3513 use calloc instead of new/memset, it is more efficient
llvm-svn: 35644
2007-04-04 00:44:31 +00:00
Chris Lattner c712a1322a Initialize the symbol table to zero explicitly. This ensures that the
symbol table does no allocations for prototypes or other lazily deserialized
functions, saving significant space and time.

llvm-svn: 35643
2007-04-04 00:30:49 +00:00
Chris Lattner 2376346a8e Extend StringMap to support being initialized as completely empty. When
initialized this way, they do not do a malloc to allocate their buckets.

llvm-svn: 35642
2007-04-04 00:29:37 +00:00
Evan Cheng 07d353c9d7 New asm test case.
llvm-svn: 35641
2007-04-04 00:15:17 +00:00
Evan Cheng 1e150dedd1 Implement inline asm modifier P.
llvm-svn: 35640
2007-04-04 00:13:29 +00:00
Evan Cheng bd31f41daa Typo.
llvm-svn: 35639
2007-04-04 00:06:07 +00:00
Bill Wendling ac5b650a54 Adding more MMX instructions.
llvm-svn: 35638
2007-04-03 23:48:32 +00:00
Chris Lattner f79fb5cad0 make a new missing features section
llvm-svn: 35637
2007-04-03 23:41:34 +00:00
Evan Cheng 10a25d43fa New test case.
llvm-svn: 35636
2007-04-03 23:40:54 +00:00
Evan Cheng 3c68d4e8ba Remove unused constant pool entries.
llvm-svn: 35635
2007-04-03 23:39:48 +00:00
Bill Wendling 2640b4a4ab Updated
llvm-svn: 35634
2007-04-03 23:37:20 +00:00
Chris Lattner e5bbb3cb1a Fix a bug I introduced with my patch yesterday which broke Qt (I converted
some constant exprs to apints).

Thanks to Anton for tracking down a small testcase that triggered this!

llvm-svn: 35633
2007-04-03 23:29:39 +00:00
Chris Lattner 64df4ba422 greatly reduce hte default size of stringmap.
llvm-svn: 35632
2007-04-03 22:15:38 +00:00
Chris Lattner 85b0927c4b move these to FrontendAda
llvm-svn: 35631
2007-04-03 21:48:02 +00:00
Chris Lattner 349987ed2c testcase for recent bugfix
llvm-svn: 35630
2007-04-03 21:47:36 +00:00
Chris Lattner 412c70ed8a move ada tests
llvm-svn: 35629
2007-04-03 21:46:22 +00:00
Evan Cheng 2c2ec5f138 New test case.
llvm-svn: 35628
2007-04-03 21:38:03 +00:00
Evan Cheng 39d8b4db92 Fixed a bug that causes codegen of noop like add r0, r0, #0.
llvm-svn: 35627
2007-04-03 21:31:21 +00:00
Chris Lattner a74deafb13 reinstate the previous two patches, with a bugfix :)
ldecod now passes.

llvm-svn: 35626
2007-04-03 17:43:25 +00:00
Nicolas Geoffray 23710a7da3 Starting implementation of the ELF32 ABI specification of varargs handling.
LowerVASTART emits the right code if the subtarget is ELF32, the other intrinsics
(VAARG, VACOPY and VAEND) are not yet implemented.

llvm-svn: 35625
2007-04-03 13:59:52 +00:00
Nicolas Geoffray b3e99a18ee The PPC64 ELF ABI is "intended to use the same structure layout and calling convention rules
as the 64-bit PowerOpen ABI" (Reference http://www.linux-foundation.org/spec/ELF/ppc64/).
Change all ELF tests to ELF32.

llvm-svn: 35624
2007-04-03 12:35:28 +00:00
Nicolas Geoffray ab559f6e3c Addition to the previous commit for getCalleeSavedRegClasses:
"The ELF ABI specifies F1-F8 registers as argument registers for double, not
F1-F10. This affects only ELF, not MachO."

llvm-svn: 35623
2007-04-03 10:57:49 +00:00
Nicolas Geoffray fbfc451ba9 The ELF ABI specifies F1-F8 registers as argument registers for double, not
F1-F10. This affects only ELF, not MachO.

llvm-svn: 35622
2007-04-03 10:27:07 +00:00
Reid Spencer d0b2dbfa03 Prepare for Subversion migration by implementing a -usesvn to tell the
script to to check out llvm and llvm-test from Subversion instead of CVS.
Without this option the script will continue to check out from CVS. To
specify the Subversion URL, set the SVNURL environment variable or pass
-svnurl followed by the URL. For now, -svnurl will default to Reid's
temporary (read-only, daily snapshot) SVN server. Try it out if you like!

llvm-svn: 35621
2007-04-03 08:28:44 +00:00
Evan Cheng 7511fa280d Reverting back to 1.723. The last two commits broke JM (and possibily others) on ARM.
llvm-svn: 35620
2007-04-03 08:11:50 +00:00
Evan Cheng e8315fe3f5 Inverted logic.
llvm-svn: 35619
2007-04-03 06:44:25 +00:00
Evan Cheng 06a7041ff9 Bad bad bug. findRegisterUseOperand() returns -1 if a use if not found.
llvm-svn: 35618
2007-04-03 06:43:29 +00:00
Bill Wendling 652c7b2d73 Changed to new MMX_ recipes.
llvm-svn: 35617
2007-04-03 06:18:31 +00:00
Bill Wendling e7b2a864f2 Add FEMMS and ADDQ. Renamed MMX recipes to prepend the MMX_ to them.
llvm-svn: 35616
2007-04-03 06:00:37 +00:00
Chris Lattner 81e0707552 split some code out into a helper function
llvm-svn: 35615
2007-04-03 05:11:24 +00:00
Chris Lattner 64c764cebc Split a whole ton of code out of visitICmpInst into visitICmpInstWithInstAndIntCst.
llvm-svn: 35614
2007-04-03 04:46:52 +00:00
Chris Lattner fae5c8fae9 add missing operator
llvm-svn: 35613
2007-04-03 04:25:46 +00:00
Chris Lattner 8b2ec5f506 Fix PR1253 and xor2.ll:test[01]
llvm-svn: 35612
2007-04-03 01:47:41 +00:00
Chris Lattner d4594adf43 new testcase for PR1253
llvm-svn: 35611
2007-04-03 01:45:32 +00:00
Chris Lattner 6b3ff17c70 add a helper function to constantint.
llvm-svn: 35610
2007-04-03 01:41:34 +00:00
Chris Lattner f742e2fe70 Arm supports negative strides as well, add them. This lets us compile:
CodeGen/ARM/arm-negative-stride.ll to:

LBB1_2: @bb
        str r1, [r3, -r0, lsl #2]
        add r0, r0, #1
        cmp r0, r2
        bne LBB1_2      @bb

llvm-svn: 35609
2007-04-03 00:13:57 +00:00
Chris Lattner 67f99e955b new testcase, where we should use a negative stride
llvm-svn: 35608
2007-04-03 00:13:16 +00:00
Chris Lattner f3197a7d53 allow -1 strides to reuse "1" strides.
llvm-svn: 35607
2007-04-02 22:51:58 +00:00
Chris Lattner d9eb0d9f5a Add a regtest for cases we now recognize as rotates, thanks to Scott Michel's
recent dagcombine patch

llvm-svn: 35606
2007-04-02 22:08:54 +00:00
Scott Michel 16627a542f 1. Insert custom lowering hooks for ISD::ROTR and ISD::ROTL.
2. Help DAGCombiner recognize zero/sign/any-extended versions of ROTR and ROTL
patterns. This was motivated by the X86/rotate.ll testcase, which should now
generate code for other platforms (and soon-to-come platforms.) Rewrote code
slightly to make it easier to read.

llvm-svn: 35605
2007-04-02 21:36:32 +00:00
Chris Lattner a7152a90d1 fix this testcase so it passes
llvm-svn: 35604
2007-04-02 20:46:28 +00:00
Chris Lattner dd59227a73 fix this testcase on ppc hosts
llvm-svn: 35603
2007-04-02 20:39:48 +00:00
Dale Johannesen d13786dd82 fix off by 1 error in displacement computation
llvm-svn: 35602
2007-04-02 20:31:06 +00:00
Chris Lattner 8e168a4f36 fix the CodeGen/ARM/2007-03-13-InstrSched.ll regression: allow IV's with scales
to be folded into non-store instructions.

llvm-svn: 35601
2007-04-02 18:51:18 +00:00
Evan Cheng 476fb6a5c9 Ugh. Copy coalescer does not update register numbers.
llvm-svn: 35600
2007-04-02 18:49:18 +00:00
Evan Cheng f7f8e349d6 New test case.
llvm-svn: 35599
2007-04-02 18:47:13 +00:00
Chris Lattner 6223e83f6d add support for the 'w' inline asm register class.
llvm-svn: 35598
2007-04-02 17:24:08 +00:00
Devang Patel eb44d8fb19 Update example notes to clarify system linker's role.
llvm-svn: 35597
2007-04-02 16:54:12 +00:00
Reid Spencer 3b40d3887b Regenerate.
llvm-svn: 35596
2007-04-02 15:41:39 +00:00
Reid Spencer 18c121d55d Check for .svn directories too to determine if a debug build is appropriate.
llvm-svn: 35595
2007-04-02 15:40:39 +00:00
Zhou Sheng 9bc8ab100d 1. Make use of APInt operation instead of using ConstantExpr::getXXX.
2. Use cheaper APInt methods.

llvm-svn: 35594
2007-04-02 13:45:30 +00:00
Zhou Sheng 56cda95658 Use uint32_t for bitwidth instead of unsigned.
llvm-svn: 35593
2007-04-02 08:20:41 +00:00
Chris Lattner 28e0e4e11e Pass the type of the store access, not the type of the store, into the
target hook.  This allows us to codegen a loop as:

LBB1_1: @cond_next
        mov r2, #0
        str r2, [r0, +r3, lsl #2]
        add r3, r3, #1
        cmn r3, #1
        bne LBB1_1      @cond_next

instead of:

LBB1_1: @cond_next
        mov r2, #0
        str r2, [r0], #+4
        add r3, r3, #1
        cmn r3, #1
        bne LBB1_1      @cond_next

This looks the same, but has one fewer induction variable (and therefore,
one fewer register) live in the loop.

llvm-svn: 35592
2007-04-02 06:34:44 +00:00
Chris Lattner be96c646dc new testcase.
llvm-svn: 35591
2007-04-02 06:33:10 +00:00
Chris Lattner 3e21eb7fd7 Fix a bug which caused us to never be able to use signed comparisons for
equality comparisons of a constant.  This allows us to codegen the 'sintzero'
loop in PR1288 as:

LBB1_1: ;cond_next
        li r4, 0
        addi r2, r2, 1
        stw r4, 0(r3)
        addi r3, r3, 4
        cmpwi cr0, r2, -1
        bne cr0, LBB1_1 ;cond_next

instead of:

LBB1_1: ;cond_next
        addi r2, r2, 1
        li r4, 0
        xoris r5, r2, 65535
        stw r4, 0(r3)
        addi r3, r3, 4
        cmplwi cr0, r5, 65535
        bne cr0, LBB1_1 ;cond_next

This implements CodeGen/PowerPC/compare-simm.ll, and also cuts 74
instructions out of kc++.

llvm-svn: 35590
2007-04-02 05:59:42 +00:00
Chris Lattner 745f59bfde new testcase
llvm-svn: 35589
2007-04-02 05:57:59 +00:00
Chris Lattner 9d5aacee92 Wrap long line
llvm-svn: 35588
2007-04-02 05:48:58 +00:00
Chris Lattner 50490d54f2 use more obvious function name.
llvm-svn: 35587
2007-04-02 05:42:22 +00:00
Chris Lattner a3e0bb4ebb Treat xor of signbit like an add.
llvm-svn: 35586
2007-04-02 05:41:38 +00:00
Chris Lattner d14447833a add a helper function.
llvm-svn: 35585
2007-04-02 05:41:00 +00:00
Chris Lattner b24acc7bee simplify (x+c)^signbit as (x+c+signbit), pointed out by PR1288. This implements
test/Transforms/InstCombine/xor.ll:test28

llvm-svn: 35584
2007-04-02 05:36:22 +00:00
Chris Lattner 2d81c6d706 creative way to add one.
llvm-svn: 35583
2007-04-02 05:35:08 +00:00
Chris Lattner 0a844d8df1 my patch fixed the fixme.
llvm-svn: 35582
2007-04-02 05:08:54 +00:00
Reid Spencer e51961b5ba Fix illegal assembly syntax.
llvm-svn: 35581
2007-04-02 03:24:47 +00:00
Reid Spencer f361c4f4f8 bwsap -> bswap
llvm-svn: 35580
2007-04-02 02:25:19 +00:00
Reid Spencer 69e56c3461 Regenerate
llvm-svn: 35579
2007-04-02 02:08:35 +00:00
Reid Spencer 940fccb088 Upgrade the bit count intrinsics to have an i32 result.
llvm-svn: 35578
2007-04-02 02:08:05 +00:00
Reid Spencer a3bc850712 Add a test case to make sure that constant folding of the bit counting
intrinsics works.

llvm-svn: 35577
2007-04-02 01:45:31 +00:00
Chris Lattner b7b75145f1 reduce use of std::set
llvm-svn: 35576
2007-04-02 01:44:59 +00:00
Chris Lattner c3748562bd Various passes before isel split edges and do other CFG-restructuring changes.
isel has its own particular features that it wants in the CFG, in order to
reduce the number of times a constant is computed, etc.  Make sure that we
clean up the CFG before doing any other things for isel.  Doing so can
dramatically reduce the number of split edges and reduce the number of
places that constants get computed.  For example, this shrinks
CodeGen/Generic/phi-immediate-factoring.ll from 44 to 37 instructions on X86,
and from 21 to 17 MBB's in the output.  This is primarily a code size win,
not a performance win.

This implements CodeGen/Generic/phi-immediate-factoring.ll and PR1296.

llvm-svn: 35575
2007-04-02 01:35:34 +00:00
Chris Lattner 4cb30067c2 new testcase for PR1296
llvm-svn: 35574
2007-04-02 01:32:59 +00:00
Lauro Ramos Venancio 6be85337b0 - Divides the comparisons in two types: comparisons that only use N and Z
flags (ARMISD::CMPNZ) and comparisons that use all flags (ARMISD::CMP).
- Defines the instructions: TST, TEQ (ARM) and TST (Thumb).

llvm-svn: 35573
2007-04-02 01:30:03 +00:00
Chris Lattner 7c773e6850 add range version of insert()
llvm-svn: 35572
2007-04-02 01:21:19 +00:00
Reid Spencer 1bd88bdab3 Regenerate
llvm-svn: 35571
2007-04-02 01:14:00 +00:00
Reid Spencer 86207ee54d Don't upgrade functions that look like a bswap intrinsic but aren't.
llvm-svn: 35570
2007-04-02 01:13:36 +00:00
Reid Spencer 84c90a9431 Let llvm-upgrade upgrade the bswap intrinsic.
llvm-svn: 35569
2007-04-02 01:09:19 +00:00
Reid Spencer 0b544372d4 Let llvm-upgrade upgrade bswap intrinsic.
llvm-svn: 35568
2007-04-02 01:08:02 +00:00
Reid Spencer fad9bd6b92 For PR1297:
Make sure that the CTPOP result is casted to i32 as the bit counting
intrinsics all return i32 now (this affects CTLZ and CTTZ as well).

llvm-svn: 35567
2007-04-02 01:01:49 +00:00
Reid Spencer a5f996bd27 Revert the name changes for llvm.bswap to allow (and test) llvm-upgrade of
this intrinsic.

llvm-svn: 35566
2007-04-02 00:51:15 +00:00
Reid Spencer ef592214e2 Handle upgrade of llvm.bswap.iXX to llvm.bswap.iXX.iXX per new naming
rules for overloaded intrinsic functions.

llvm-svn: 35565
2007-04-02 00:50:28 +00:00
Reid Spencer 403a1c4517 Fix some bswap typos that Chris noticed.
llvm-svn: 35564
2007-04-02 00:19:52 +00:00
Chris Lattner 8fe3cbe6bd print the type of an inserted IV in -debug mode.
llvm-svn: 35563
2007-04-01 22:21:39 +00:00
Anton Korobeynikov ecc769e4f2 Add testcase for correct sret handling.
llvm-svn: 35562
2007-04-01 22:03:04 +00:00
Chris Lattner c3eeb42809 simplify this code, make it work for ap ints
llvm-svn: 35561
2007-04-01 20:57:36 +00:00
Chris Lattner 59a6fa7af6 fix breakage from last night, simplify code.
llvm-svn: 35560
2007-04-01 20:49:36 +00:00
Chris Lattner 489ad3313a gcc 3.4.4 is known-bad on x86-64
llvm-svn: 35559
2007-04-01 20:14:46 +00:00
Reid Spencer 8bc7d957cf Preview documentation for additional intrinsic functions.
llvm-svn: 35558
2007-04-01 19:00:37 +00:00
Jeff Cohen 3e96df52d8 Unbreak VC++ build.
llvm-svn: 35557
2007-04-01 18:58:22 +00:00
Reid Spencer add6123405 The bit counting intrinsics return i32 not the operand type. This fixes
last night's regression in SingleSource/UnitTests/2005-05-11-Popcount-ffs-fls

llvm-svn: 35556
2007-04-01 18:42:20 +00:00
Zhou Sheng 150f3bbab2 Avoid unnecessary APInt construction.
llvm-svn: 35555
2007-04-01 17:13:37 +00:00
Duncan Sands 2e45201769 Testcase for the problem worked around in
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070319/046204.html

llvm-svn: 35554
2007-04-01 15:29:02 +00:00
Zhou Sheng 63b6bc1c88 Remove unused methods.
llvm-svn: 35553
2007-04-01 12:45:33 +00:00
Reid Spencer 8a5799f558 For PR1297:
Preview documentation for the llvm.bit.concat intrinsic (yet to be
implemented).

llvm-svn: 35552
2007-04-01 08:27:01 +00:00
Evan Cheng 17d48a8bc2 Add i16 address mode.
llvm-svn: 35551
2007-04-01 08:06:46 +00:00
Reid Spencer 4eefaab3f6 For PR1297:
Document changes to bswap and bit counting intrinsics. bswap's name now
requires two types in the suffix per overloaded intrinsic naming rules.
The ctpop, cttz, and ctlz intrinsics were changed to always return i32.

llvm-svn: 35550
2007-04-01 08:04:23 +00:00
Reid Spencer 9ade28d260 Mention how to create overloaded intrinsics.
llvm-svn: 35549
2007-04-01 07:44:52 +00:00
Reid Spencer c3d87685ad For PR1297:
Update these test cases to use proper signatures for bswap which is now
and overloaded intrinsic. Its name must be of the form llvm.bswap.i32.i32
since both the parameter and the result or of type "iAny". Also, the
bit counting intrinsics changed to always return i32.

llvm-svn: 35548
2007-04-01 07:36:28 +00:00
Reid Spencer 6bba6c8143 For PR1297:
Support overloaded intrinsics bswap, ctpop, cttz, ctlz.

llvm-svn: 35547
2007-04-01 07:35:23 +00:00
Reid Spencer 3a0843e734 For PR1297:
Adjust for changes in the bit counting intrinsics. They all return i32
now so we have to trunc/zext the DAG node accordingly.

llvm-svn: 35546
2007-04-01 07:34:11 +00:00
Reid Spencer a090ffb2ab For PR1297:
Change getOperationName to return std::string instead of const char*

llvm-svn: 35545
2007-04-01 07:32:19 +00:00
Reid Spencer eba021453b For PR1297:
Implement bswap, ctpop, ctlz, and cttz utilizing the new overloaded
intrinsic feature of tblgen. By defining llvm_int_ty to have an ValueType
of iAny, any intrinsic using that type becomes an overloaded intrinsic.
This signals that a) any integer type could be used for that argument and
b) the intrinsic needs a suffix to match each such argument for the
actual intrinsic.

llvm-svn: 35544
2007-04-01 07:30:57 +00:00
Reid Spencer c7c4880ab1 For PR1297:
Intrinsic functions might need to be generated (if they are overloaded) so
returning a const char* is no longer possible. Change getOperationName to
return a std::string instead.

llvm-svn: 35543
2007-04-01 07:28:37 +00:00