llvm-project/polly/lib/Support
Michael Kruse 5369ea5dd5 Allow arbitrary function calls for debugging purposes.
Add the switch -polly-debug-func to define the name of a debug
function. This function is ignored for any validity check.

Its purpose is to allow to observe a value after transformation by a
SCoP, and to follow which statements are executed in which order. For
instance, consider the following code:

    static void dbg_printf(int sum, int i) {
      fprintf(stderr, "The value of sum is %d, i=%d\n", sum, i);
      fflush(stderr);
    }

    void func(int n) {
      int sum = 0;
      for (int i = 0; i < 16; i+=1) {
        sum += i;
        dbg_printf(sum, i);
      }
    }

Executing this after Polly's codegen with -polly-debug-func=dbg_printf
reveals the new execution order and the assumed values at that point of
execution.

Differential Revision: https://reviews.llvm.org/D45728

llvm-svn: 330466
2018-04-20 18:55:44 +00:00
..
DumpModulePass.cpp [Support] Rename tool_output_file to ToolOutputFile, NFC 2017-09-23 01:03:17 +00:00
GICHelper.cpp Do not call band_list().dump() 2018-02-20 07:24:40 +00:00
ISLTools.cpp [polly] Change std::sort to llvm::sort in response to r327219 2018-03-13 05:25:23 +00:00
Mainpage.h docs: Add doxygen mainpage 2016-03-07 21:17:48 +00:00
PollyPasses.def [JSON][PM] Port json import/export over to new pm 2017-08-10 14:45:09 +00:00
RegisterPasses.cpp [NewPM] Update pass registration for the LLVM plugin interface 2018-04-17 07:59:46 +00:00
SCEVAffinator.cpp Revert r327216 'Add isl operator overloads for isl::pw_aff' 2018-04-11 16:58:08 +00:00
SCEVValidator.cpp [ScopInfo] Allow uniform branch conditions 2017-09-25 16:37:15 +00:00
ScopHelper.cpp Allow arbitrary function calls for debugging purposes. 2018-04-20 18:55:44 +00:00
ScopLocation.cpp clang-tidy: Add llvm namespace comments 2016-06-23 22:17:27 +00:00
VirtualInstruction.cpp [VirtualInst] Derive correct use kind of PHI operands. NFC. 2018-01-23 23:56:25 +00:00