summaryrefslogtreecommitdiffstats
path: root/polly/lib/CodeGen/CodeGeneration.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Codegen: Selectively copy in array addresses for OpenMP codeTobias Grosser2012-11-011-10/+0
| | | | | | | | | | | | | | | | | The detection of values that need to be copied in to the generated OpenMP subfunction also detects the array base addresses needed in the SCoP. Hence, it is not necessary to unconditionally copy all the base addresses to the generated function. Test cases are modified to reflect this change. Arrays which are global variables do not occur in the struct passed to the subfunction anymore. A test case for base address copy-in is added in copy_in_array.{c,ll}. Committed with slight modifications Contributed by: Armin Groesslinger <armin.groesslinger@uni-passau.de> llvm-svn: 167215
* CodeGen: Add scop-parameters to the OpenMP contextTobias Grosser2012-11-011-3/+52
| | | | | | | | | | | | | In addition to the arrays and clast variables a SCoP statement may also refer to values defined before the SCoP or to function arguments. Detect these values and add them to the set of values passed to the function generated for OpenMP parallel execution of a clast. Committed with additional test cases and some refactoring. Contributed by: Armin Groesslinger <armin.groesslinger@uni-passau.de> llvm-svn: 167214
* Codegen: Copy and restore the ValueMap and ClastVars explicitlyTobias Grosser2012-11-011-33/+24
| | | | | | | | | | | | When generating OpenMP or GPGPU code the original ValueMap and ClastVars must be kept. We already recovered the original ClastVars by reverting the changes, but we did not keep the content of the ValueMap. This patch keeps now an explicit copy of both maps and restores them after generating OpenMP or GPGPU code. This is an adapted version of a patch contributed by: Armin Groesslinger <armin.groesslinger@uni-passau.de> llvm-svn: 167213
* Try to revive the Polly builders after this LLVM API change.Chandler Carruth2012-10-251-1/+2
| | | | llvm-svn: 166666
* isl-codegen: Support '<' and '>'Tobias Grosser2012-10-161-1/+2
| | | | | | | | Previously isl always generated '<=' or '>='. However, in many cases '<' or '>' leads to simpler code. This commit updates isl and adds the relevant code generation support to Polly. llvm-svn: 166020
* Move TargetData to DataLayout to fix build breakage caused by LLVM r16540Micah Villmow2012-10-081-3/+3
| | | | llvm-svn: 165408
* Rename TargetData -> DataLayoutTobias Grosser2012-10-081-1/+1
| | | | | | Contributed by: Sameer Sahasrabuddhe <sameer.sahasrabuddhe@amd.com> llvm-svn: 165387
* Add preliminary implementation for GPGPU code generation.Tobias Grosser2012-08-031-0/+204
| | | | | | | | | | | | | | | | | | | | | | Translate the selected parallel loop body into a ptx string and run it with the cuda driver API. We limit this preliminary implementation to target the following special test cases: - Support only 2-dimensional parallel loops with or without only one innermost non-parallel loop. - Support write memory access to only one array in a SCoP. The patch was committed with smaller changes to the build system: There is now a flag to enable gpu code generation explictly. This was required as we need the llvm.codegen() patch applied on the llvm sources, to compile this feature correctly. Also, enabling gpu code generation does not require cuda. This requirement was removed to allow 'make polly-test' runs, even without an installed cuda runtime. Contributed by: Yabin Hu <yabin.hwu@gmail.com> llvm-svn: 161239
* Revert "Add preliminary implementation for GPGPU code generation."Tobias Grosser2012-07-131-196/+0
| | | | | | | | | | | | I did not take into account, that this patch fails to compile without the llvm.codegen patch applied. This breaks buildbots. I revert this until we found a solution to commit this without buildbots complaining. This reverts commit cb43ab80e94434e780a66be3b9a6ad466822fe33. llvm-svn: 160165
* Add preliminary implementation for GPGPU code generation.Tobias Grosser2012-07-131-0/+196
| | | | | | | | | | | | | Translate the selected parallel loop body into a ptx string and run it with cuda driver API. We limit this preliminary implementation to target the following special test cases: - Support only 2-dimensional parallel loops with or without only one innermost non-parallel loop. - Support write memory access to only one array in a SCoP. Contributed by: Yabin Hu <yabin.hwu@gmail.com> llvm-svn: 160164
* Move executeScopConditionally() into its own fileTobias Grosser2012-05-291-137/+11
| | | | | | We will reuse this function for the isl code generator. llvm-svn: 157605
* Move CLooG.h into include/polly/CodeGen/Tobias Grosser2012-05-291-1/+1
| | | | llvm-svn: 157604
* Move isParallelFor into CodeGenerationTobias Grosser2012-05-221-1/+21
| | | | | | This removes another include of CLooG header files. llvm-svn: 157242
* add some more missing ifdef CLOOG_FOUNDSebastian Pop2012-05-071-2/+5
| | | | llvm-svn: 156306
* Allow polly ask bb-vectorizer to vectorize the loop body.Hongbin Zheng2012-05-061-8/+1
| | | | llvm-svn: 156254
* Refactor: Move the code generation related header files to ↵Hongbin Zheng2012-04-251-3/+3
| | | | | | include/polly/CodeGen. llvm-svn: 155547
* Refactor: Move the declaration of the BlockGenerator/VectorBlockGeneratorHongbin Zheng2012-04-251-824/+2
| | | | | | to standalone header and source files. llvm-svn: 155546
* Refactor: Pass the argument 'IRBuilder' and 'AfterBlock' of function ↵Hongbin Zheng2012-04-231-1/+1
| | | | | | | | 'createLoop' by reference, so that we do not need to type an extra '&' operator when calling the function. llvm-svn: 155349
* CodeGen: Generate scalar code if vector instructions cannot be generatedTobias Grosser2012-04-121-7/+68
| | | | | | | | This fixes two crashes that appeared in case of: - A load of a non vectorizable type (e.g. float**) - An instruction that is not vectorizable (e.g. call) llvm-svn: 154586
* CodeGen: Allow Polly to do 'grouped unrolling', but no vector generation.Tobias Grosser2012-04-071-0/+14
| | | | | | | | | | Grouped unrolling means that we unroll a loop such that the different instances of a certain statement are scheduled right after each other, but we do not generate any vector code. The idea here is that we can schedule the bb vectorizer right afterwards and use it heuristics to decide when vectorization should be performed. llvm-svn: 154251
* CodeGen: Remove unused declarationTobias Grosser2012-04-031-2/+0
| | | | llvm-svn: 153954
* CodeGen: Recreate old ivs with the original typeTobias Grosser2012-04-031-1/+2
| | | | | | | | | | | | | | | To avoid overflows we still use a larger type (i64) while calculating the value of the old ivs. However, we truncate the result to the type of the old iv when providing it to the new code. A corresponding test case is added to the polly test suite. Also, a failing test case is fixed. This fixes PR12311. Contributed by: Tsingray Liu <tsingrayliu@gmail.com> llvm-svn: 153952
* CodeGen: Some style improvementsTobias Grosser2012-04-021-9/+10
| | | | llvm-svn: 153871
* CodeGen: Remove unused variableTobias Grosser2012-04-011-5/+5
| | | | llvm-svn: 153840
* CodeGen: Allow function parameters to be rewritten in getNewValue()Tobias Grosser2012-04-011-11/+15
| | | | | | | | | | | | | When deriving new values for the statements of a SCoP, we assumed that parameter values are constant within the SCoP and consquently do not need to be rewritten. For OpenMP code generation this assumption is wrong, as such values are not available in the OpenMP subfunction and consequently also may need to be rewritten. Committed with some changes. Contributed-By: Johannes Doerfert <s9jodoer@stud.uni-saarland.de> llvm-svn: 153838
* Move the CodeGeneration.cpp to the CodeGen folder and update the build system.Hongbin Zheng2012-03-301-0/+1689
Patched by Tsingray. llvm-svn: 153736
OpenPOWER on IntegriCloud