summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86FastISel.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [fast-isel] Add X86FastIsel::FastLowerArguments to handle functions with 6 orChad Rosier2013-02-251-0/+73
| | | | | | | | | | fewer scalar integer (i32 or i64) arguments. It completely eliminates the need for SDISel for trivial functions. Also, add the new llc -fast-isel-abort-args option, which is similar to -fast-isel-abort option, but for formal argument lowering. llvm-svn: 176052
* Remove a useless assert.Chad Rosier2013-02-181-1/+0
| | | | llvm-svn: 175463
* Return false instead of 0.Jakub Staszak2013-02-171-1/+1
| | | | llvm-svn: 175402
* Simplify code. Remove "else after return".Jakub Staszak2013-02-141-5/+4
| | | | llvm-svn: 175212
* Move MRI liveouts to X86 return instructions.Jakob Stoklund Olesen2013-02-051-4/+10
| | | | llvm-svn: 174402
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-7/+7
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
* Remove the Function::getRetAttributes method in favor of using the ↵Bill Wendling2012-12-301-4/+2
| | | | | | AttributeSet accessor method. llvm-svn: 171256
* Change TargetLowering::RegisterTypeForVT to contain MVTs, instead ofPatrik Hagglund2012-12-191-2/+2
| | | | | | EVTs. llvm-svn: 170535
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-191-10/+10
| | | | | | single attribute in the future. llvm-svn: 170502
* Revert EVT->MVT changes, r169836-169851, due to buildbot failures.Patrik Hagglund2012-12-111-2/+2
| | | | llvm-svn: 169854
* Change TargetLowering::RegisterTypeForVT to contain MVTs, instead ofPatrik Hagglund2012-12-111-2/+2
| | | | | | EVTs. llvm-svn: 169848
* Fall back to the selection dag isel to select tail calls.Chad Rosier2012-12-111-0/+4
| | | | | | | | | | | | | | | | | | | This shouldn't affect codegen for -O0 compiles as tail call markers are not emitted in unoptimized compiles. Testing with the external/internal nightly test suite reveals no change in compile time performance. Testing with -O1, -O2 and -O3 with fast-isel enabled did not cause any compile-time or execution-time failures. All tests were performed on my x86 machine. I'll monitor our arm testers to ensure no regressions occur there. In an upcoming clang patch I will be marking the objc_autoreleaseReturnValue and objc_retainAutoreleaseReturnValue as tail calls unconditionally. While it's theoretically true that this is just an optimization, it's an optimization that we very much want to happen even at -O0, or else ARC applications become substantially harder to debug. Part of rdar://12553082 llvm-svn: 169796
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-7/+7
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* Return 0 instead of false.Jakub Staszak2012-11-151-3/+3
| | | | llvm-svn: 168076
* Simplify code.Jakub Staszak2012-11-151-1/+1
| | | | llvm-svn: 168064
* Revert the series of commits starting with r166578 which introduced theChandler Carruth2012-11-011-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | getIntPtrType support for multiple address spaces via a pointer type, and also introduced a crasher bug in the constant folder reported in PR14233. These commits also contained several problems that should really be addressed before they are re-committed. I have avoided reverting various cleanups to the DataLayout APIs that are reasonable to have moving forward in order to reduce the amount of churn, and minimize the number of commits that were reverted. I've also manually updated merge conflicts and manually arranged for the getIntPtrType function to stay in DataLayout and to be defined in a plausible way after this revert. Thanks to Duncan for working through this exact strategy with me, and Nick Lewycky for tracking down the really annoying crasher this triggered. (Test case to follow in its own commit.) After discussing with Duncan extensively, and based on a note from Micah, I'm going to continue to back out some more of the more problematic patches in this series in order to ensure we go into the LLVM 3.2 branch with a reasonable story here. I'll send a note to llvmdev explaining what's going on and why. Summary of reverted revisions: r166634: Fix a compiler warning with an unused variable. r166607: Add some cleanup to the DataLayout changes requested by Chandler. r166596: Revert "Back out r166591, not sure why this made it through since I cancelled the command. Bleh, sorry about this! r166591: Delete a directory that wasn't supposed to be checked in yet. r166578: Add in support for getIntPtrType to get the pointer type based on the address space. llvm-svn: 167221
* Cleanup another place redundant SP maintainedMichael Liao2012-11-011-4/+4
| | | | llvm-svn: 167209
* Add in support for getIntPtrType to get the pointer type based on the ↵Micah Villmow2012-10-241-4/+6
| | | | | | | | | address space. This checkin also adds in some tests that utilize these paths and updates some of the clients. llvm-svn: 166578
* Use the attribute enums to query if a parameter has an attribute.Bill Wendling2012-10-091-10/+10
| | | | llvm-svn: 165550
* Add methods which query for the specific attribute instead of using theBill Wendling2012-10-031-10/+10
| | | | | | enums. This allows for better encapsulation of the Attributes class. llvm-svn: 165132
* Revert 165051-165049 while looking into the foreach.m failure inEric Christopher2012-10-031-2/+2
| | | | | | more detail. llvm-svn: 165099
* Make sure to put our sret argument into %rax on x86-64. Fixes PR13563!Nick Lewycky2012-10-021-2/+16
| | | | llvm-svn: 165063
* Remove the SavePoint infrastructure from fast isel, replaceEric Christopher2012-10-021-2/+2
| | | | | | | with just an insert point from the MachineBasicBlock and let the location be updated as we access it. llvm-svn: 165049
* Fix PR13727Michael Liao2012-08-301-3/+7
| | | | | | | | | | | - The root cause is that target constant materialization in X86 fast-isel creates a PC-rel addressing which may overflow 32-bit range in non-Small code model if .rodata section is allocated too far away from code segment in MCJIT, which uses Large code model so far. - Follow the similar logic to fix non-Small code model in fast-isel by skipping non-Small code model. llvm-svn: 162881
* Tidy up indentation. No functional change.Craig Topper2012-08-111-25/+25
| | | | llvm-svn: 161727
* Fix a cast that was casting away 'const' unnecessarily Craig Topper2012-08-111-1/+1
| | | | llvm-svn: 161726
* Fall back to selection DAG isel for calls to builtin functions.Bob Wilson2012-08-031-3/+6
| | | | | | | | | | Fast isel doesn't currently have support for translating builtin function calls to target instructions. For embedded environments where the library functions are not available, this is a matter of correctness and not just optimization. Most of this patch is just arranging to make the TargetLibraryInfo available in fast isel. <rdar://problem/12008746> llvm-svn: 161232
* Fix typos. Thanks to Matt Beaumont-Gay for noticing it.Rafael Espindola2012-07-251-3/+3
| | | | llvm-svn: 160731
* When a return struct pointer is passed in registers, the called has nothingRafael Espindola2012-07-251-0/+2
| | | | | | to pop. llvm-svn: 160725
* Factor a long list of conditions into a predicate function. No functionalityRafael Espindola2012-07-251-6/+15
| | | | | | change. llvm-svn: 160724
* Fix a typo (the the => the)Sylvestre Ledru2012-07-231-1/+1
| | | | llvm-svn: 160621
* Remove tabs.Bill Wendling2012-07-191-5/+5
| | | | llvm-svn: 160477
* [x86 fast-isel] Per discussion with Eric, add all cases to switch with verboseChad Rosier2012-07-111-1/+8
| | | | | | comments. llvm-svn: 160069
* [x86 fast-isel] Rather then call llvm_unreachable() have fast-isel fall backChad Rosier2012-07-111-1/+1
| | | | | | to Selection DAG isel. Patch by Andrew Kaylor <andrew.kaylor@intel.com>. llvm-svn: 160055
* Make X86 call and return instructions non-variadic.Jakob Stoklund Olesen2012-07-041-7/+7
| | | | | | | Function argument and return value registers aren't part of the encoding, so they should be implicit operands. llvm-svn: 159728
* Simplify code for calling a function where CanLowerReturn fails, fixing a ↵Eli Friedman2012-05-251-2/+1
| | | | | | small bug in the process. llvm-svn: 157446
* Typo.Chad Rosier2012-05-111-1/+1
| | | | llvm-svn: 156633
* Fix fastcc structure return with fast-isel on x86-32Derek Schuff2012-04-301-0/+2
| | | | | | | | | | | | | | On x86-32, structure return via sret lets the callee pop the hidden pointer argument off the stack, which the caller then re-pushes. However if the calling convention is fastcc, then a register is used instead, and the caller should not adjust the stack. This is implemented with a check of IsTailCallConvention X86TargetLowering::LowerCall but is now checked properly in X86FastISel::DoSelectCall. (this time, actually commit what was reviewed!) llvm-svn: 155825
* Revert r155745Derek Schuff2012-04-271-2/+0
| | | | llvm-svn: 155746
* Fix fastcc structure return with fast-isel on x86-32Derek Schuff2012-04-271-0/+2
| | | | | | | | | | | | On x86-32, structure return via sret lets the callee pop the hidden pointer argument off the stack, which the caller then re-pushes. However if the calling convention is fastcc, then a register is used instead, and the caller should not adjust the stack. This is implemented with a check of IsTailCallConvention X86TargetLowering::LowerCall but is now checked properly in X86FastISel::DoSelectCall. llvm-svn: 155745
* Convert some uses of XXXRegisterClass to &XXXRegClass. No functional change ↵Craig Topper2012-04-201-28/+29
| | | | | | since they are equivalent. llvm-svn: 155186
* Remove unnecessary llvm:: qualificationsCraig Topper2012-03-271-1/+1
| | | | llvm-svn: 153500
* Convert more static tables of registers used by calling convention to ↵Craig Topper2012-03-111-1/+1
| | | | | | uint16_t to reduce space. llvm-svn: 152538
* Make all pointers to TargetRegisterClass const since they are all pointers ↵Craig Topper2012-02-221-1/+1
| | | | | | to static data that should not be modified. llvm-svn: 151134
* Use the same CALL instructions for Windows as for everything else.Jakob Stoklund Olesen2012-02-161-6/+2
| | | | | | | The different calling conventions and call-preserved registers are represented with regmask operands that are added dynamically. llvm-svn: 150708
* Enable register mask operands for x86 calls.Jakob Stoklund Olesen2012-02-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Call instructions no longer have a list of 43 call-clobbered registers. Instead, they get a single register mask operand with a bit vector of call-preserved registers. This saves a lot of memory, 42 x 32 bytes = 1344 bytes per call instruction, and it speeds up building call instructions because those 43 imp-def operands no longer need to be added to use-def lists. (And removed and shifted and re-added for every explicit call operand). Passes like LiveVariables, LiveIntervals, RAGreedy, PEI, and BranchFolding are significantly faster because they can deal with call clobbers in bulk. Overall, clang -O2 is between 0% and 8% faster, uniformly distributed depending on call density in the compiled code. Debug builds using clang -O0 are 0% - 3% faster. I have verified that this patch doesn't change the assembly generated for the LLVM nightly test suite when building with -disable-copyprop and -disable-branch-fold. Branch folding behaves slightly differently in a few cases because call instructions have different hash values now. Copy propagation flushes its data structures when it crosses a register mask operand. This causes it to leave a few dead copies behind, on the order of 20 instruction across the entire nightly test suite, including SPEC. Fixing this properly would require the pass to use different data structures. llvm-svn: 150638
* Use a temporary variable, rather then a series of redundant calls.Chad Rosier2012-02-151-4/+5
| | | | llvm-svn: 150538
* Support MSVC x86-32 sret convention. PR11688. Patch by Joe Groff.Eli Friedman2012-01-201-1/+2
| | | | llvm-svn: 148513
* Remove hasXMM/hasXMMInt functions. Move callers to hasSSE1/hasSSE2. This is ↵Craig Topper2012-01-101-4/+4
| | | | | | the final piece to remove the AVX hack that disabled SSE. llvm-svn: 147843
* Change some places that were checking for AVX OR SSE1/2 to use ↵Craig Topper2012-01-091-4/+4
| | | | | | hasXMM/hasXMMInt instead. Also fix one place that checked SSE3, but accidentally excluded AVX to use hasSSE3orAVX. This is a step towards removing the AVX hack from the X86Subtarget.h llvm-svn: 147764
OpenPOWER on IntegriCloud