summary refs log tree commit diff
path: root/src/rustllvm
AgeCommit message (Collapse)AuthorLines
2013-09-23Disable zlib/libffi when configuring LLVMAlex Crichton-1/+1
This should help bring fewer dependencies in to the snapshots. Closes #9397
2013-09-22touch LLVM clean triggerDaniel Micay-1/+1
2013-09-15auto merge of #9118 : alexcrichton/rust/llvm-fix, r=sanxiynbors-1/+1
I created a new branch rust-llvm-2013-09-11 in my llvm repo to mark this momentous occasion
2013-09-15Upgrade LLVM to close #9117Alex Crichton-1/+1
2013-09-15debuginfo: Added LLVMDICompositeTypeSetTypeArray to rustllvm.def.inMichael Woerister-0/+1
2013-09-15debuginfo: Added description of algorithm for handling recursive types.Michael Woerister-23/+0
Also fixed nasty bug caused by calling LLVMDIBuilderCreateStructType() with a null pointer where an empty array was expected (which would trigger an unintelligable assertion somewhere down the line).
2013-09-15debuginfo: Support for recursive types.Michael Woerister-0/+30
2013-09-10debuginfo: Wrapped namespace facilities of llvm::DIBuilderMichael Woerister-3/+18
2013-09-09add `noalias` attribute to ~ return valuesDaniel Micay-0/+17
2013-09-04debuginfo: Added test cases for structs, tuples, enums, etc passed by value.Michael Woerister-0/+3
Also updated documentation comments in debuginfo and renamed DebugContext to CrateDebugContext.
2013-09-04debuginfo: Support for variables captured in closures and closure type ↵Michael Woerister-0/+36
descriptions.
2013-09-01touch llvm clean triggerDaniel Micay-1/+1
2013-08-30Tweak pass management and add some more optionsAlex Crichton-23/+2
The only changes to the default passes is that O1 now doesn't run the inline pass, just always-inline with lifetime intrinsics. O2 also now has a threshold of 225 instead of 275. Otherwise the default passes being run is the same. I've also added a few more options for configuring the pass pipeline. Namely you can now specify arguments to LLVM directly via the `--llvm-args` command line option which operates similarly to `--passes`. I also added the ability to turn off pre-population of the pass manager in case you want to run *only* your own passes.
2013-08-28Revert "auto merge of #8695 : thestinger/rust/build, r=pcwalton"Brian Anderson-0/+2
This reverts commit 2c0f9bd35493def5e23f0f43ddeba54da9d788b4, reversing changes made to f8c4f0ea9c96218dbc81081799e77875fbb071de. Conflicts: src/rustllvm/RustWrapper.cpp
2013-08-26Rewrite pass management with LLVMAlex Crichton-181/+208
Beforehand, it was unclear whether rust was performing the "recommended set" of optimizations provided by LLVM for code. This commit changes the way we run passes to closely mirror that of clang, which in theory does it correctly. The notable changes include: * Passes are no longer explicitly added one by one. This would be difficult to keep up with as LLVM changes and we don't guaranteed always know the best order in which to run passes * Passes are now managed by LLVM's PassManagerBuilder object. This is then used to populate the various pass managers run. * We now run both a FunctionPassManager and a module-wide PassManager. This is what clang does, and I presume that we *may* see a speed boost from the module-wide passes just having to do less work. I have no measured this. * The codegen pass manager has been extracted to its own separate pass manager to not get mixed up with the other passes * All pass managers now include passes for target-specific data layout and analysis passes Some new features include: * You can now print all passes being run with `-Z print-llvm-passes` * When specifying passes via `--passes`, the passes are now appended to the default list of passes instead of overwriting them. * The output of `--passes list` is now generated by LLVM instead of maintaining a list of passes ourselves * Loop vectorization is turned on by default as an optimization pass and can be disabled with `-Z no-vectorize-loops`
2013-08-24rustllvm: Specify hard floats for gnueabihf.Luqman Aden-3/+7
2013-08-22make: stop disabling frame pointer eliminationDaniel Micay-2/+0
We currently have no need for the frame pointers on any platform. They may eventually be needed on platforms without an equivalent to the DWARF call frame information to walk the stack in the garbage collector. Closes #7477
2013-08-20auto merge of #8328 : alexcrichton/rust/llvm-head, r=brsonbors-4/+9
The first commit message is pretty good, but whomever reviews this should probably also at least glance at the changes I made in LLVM. I basically reorganized our pending patch queue to be a bit more organized and clearer in what needs to go where. After this, our queue would be: * Add the `no-split-stack` attribute * Add the `fixedstacksegment` attribute * Add split-stacks for arm android * Add split-stacks for arm linux * Add split stacks for mips Then there's a patch which I added to get rust to build at all on LLVM-head, and I'm not quite sure why it's there, but nothing seems to be crashing for now! (famous last words). Otherwise, I just updated code to reflect the changes I made in LLVM with the only major change being the advent of the new `no_split_stack` attribute. This is work towards #1226, but someone more familiar with the code should probably actually assign the attribute to the appropriate functions. Also as a bonus, I've verified that this closes #5774
2013-08-20Fix LLVM compilation issues and use the new attrsAlex Crichton-3/+8
This implements #[no_split_stack] and also changes #[fast_ffi] to using the new "fixedstacksegment" string attribute instead of integer attribute.
2013-08-20Upgrade llvm to current HEADAlex Crichton-1/+1
* This has one workaround patch (everything's testing just fine...) * I reworked the fixedstacksegment attribute to be specified with a string rather than using a keyword and an integer and modifying the parser * I added a "no-split-stack" attribute along the same lines as the "fixedstacksegment" attribute for #1226
2013-08-16debuginfo: Generate template type parameters for generic functions.Michael Woerister-0/+19
Conflicts: src/librustc/lib/llvm.rs src/librustc/middle/trans/debuginfo.rs src/rustllvm/RustWrapper.cpp src/rustllvm/rustllvm.def.in
2013-08-11auto merge of #8410 : luqmana/rust/mcpu, r=sanxiynbors-1/+2
Adds `--target-cpu` flag which lets you choose a more specific target cpu instead of just passing the default, `generic`. It's more or less akin to `-mcpu`/`-mtune` in clang/gcc.
2013-08-10rustc: Add --target-cpu flag to select a more specific processor instead of ↵Luqman Aden-1/+2
the default, 'generic'.
2013-08-09Implement an `address_insignificant` attributeAlex Crichton-0/+5
This can be applied to statics and it will indicate that LLVM will attempt to merge the constant in .data with other statics. I have preliminarily applied this to all of the statics generated by the new `ifmt!` syntax extension. I compiled a file with 1000 calls to `ifmt!` and a separate file with 1000 calls to `fmt!` to compare the sizes, and the results were: fmt 310k ifmt (before) 529k ifmt (after) 202k This now means that ifmt! is both faster and smaller than fmt!, yay!
2013-08-04Fix build issues once LLVM has been upgradedAlex Crichton-10/+3
* LLVM now has a C interface to LLVMBuildAtomicRMW * The exception handling support for the JIT seems to have been dropped * Various interfaces have been added or headers have changed
2013-08-04Update LLVMAlex Crichton-1/+1
2013-07-28Add an atomic fence intrinsicJames Miller-1/+5
2013-07-21Avoid blocks for static allocas and loading the closure environmentBjörn Steinbrink-0/+1
These blocks were required because previously we could only insert instructions at the end of blocks, but we wanted to have all allocas in one place, so they can be collapse. But now we have "direct" access the the LLVM IR builder and can position it freely. This allows us to use the same trick that clang uses, which means that we insert a dummy "marker" instruction to identify the spot at which we want to insert allocas. We can then later position the IR builder at that spot and insert the alloca instruction, without any dedicated block. The block for loading the closure environment can now also go away, because the function context now provides the toplevel block, and the translation of the loading happens first, so that's good enough. Makes the LLVM IR a bit more readable, saving a bunch of branches in the unoptimized code, which benefits unoptimized builds.
2013-07-19debuginfo: Fixed some merge falloutMichael Woerister-0/+3
2013-07-19debuginfo: Support for tuple-style enums (WIP)Michael Woerister-42/+66
2013-07-19debuginfo: Added support for c-style enums.Michael Woerister-0/+30
2013-07-03force LLVM cleanDaniel Micay-1/+1
2013-07-01Turn on using LLVM threadsafelyAlex Crichton-0/+4
2013-06-27mk: add mechanisms for triggering clean-llvm builds from commitsGraydon Hoare-0/+0
2013-06-19rustc: Dispose of LLVM passes in test casesBrian Anderson-0/+6
2013-06-17Fixed rebase fallout .Vadim Chugunov-1/+3
2013-06-17Fixed remaining issues to pass debug-test/* tests.Vadim Chugunov-0/+12
Made debugger scripts source line insensitive.
2013-06-17Made the while DebugContext mutable, not just created_* hashesVadim Chugunov-34/+46
Disabled create_arg
2013-06-17Use DIBuilder in debuginfoVadim Chugunov-0/+220
2013-06-15auto merge of #7125 : alexcrichton/rust/rusti-issues, r=brsonbors-38/+39
This un-reverts the reverts of the rusti commits made awhile back. These were reverted for an LLVM failure in rustpkg. I believe that this is not a problem with these commits, but rather that rustc is being used in parallel for rustpkg tests (in-process). This is not working yet (almost! see #7011), so I serialized all the tests to run one after another. @brson, I'm mainly just guessing as to the cause of the LLVM failures in rustpkg tests. I'm confident that running tests in parallel is more likely to be the problem than those commits I made. Additionally, this fixes two recently reported issues with rusti.
2013-06-13Don't run passes again on JIT codeAlex Crichton-14/+0
These passes are already run beforehand, no need to do them twice.
2013-06-13Revert "Revert "Have JIT execution take ownership of the LLVMContextRef""Alex Crichton-19/+16
This reverts commit 19adece68b00bd1873499cca6f1537750608d769.
2013-06-13Revert "Revert "Remove all usage of the global LLVMContextRef""Alex Crichton-7/+25
This reverts commit 541c657a738006d78171aa261125a6a46f283b35.
2013-06-13automated whitespace fixesDaniel Micay-1/+0
2013-06-13Revert "Remove all usage of the global LLVMContextRef"Brian Anderson-25/+7
This reverts commit 779191cd4b8719e8efdf69fb6da93e2a8905ca1d. Conflicts: src/librustc/middle/trans/base.rs src/librustc/middle/trans/common.rs
2013-06-13Revert "Have JIT execution take ownership of the LLVMContextRef"Brian Anderson-16/+19
This reverts commit 5c5095d25e3652c434c8d4ec178e6844877e3c2d. Conflicts: src/librusti/rusti.rc
2013-06-10Have JIT execution take ownership of the LLVMContextRefAlex Crichton-19/+16
Also stop leaking the ExecutionEngine created for jit code by forcibly disposing of it after the JIT code has finished executing
2013-06-10Remove all usage of the global LLVMContextRefAlex Crichton-7/+25
This allows parallel usage of the rustc library
2013-05-29Further refactor optimization pass handlingJames Miller-216/+25
This refactors pass handling to use the argument names, so it can be used in a similar manner to `opt`. This may be slightly less efficient than the previous version, but it is much easier to maintain. It also adds in the ability to specify a custom pipeline on the command line, this overrides the normal passes, however. This should completely close #2396.
2013-05-29Remove extraneous defs from export fileJames Miller-3/+0