[all-commits] [llvm/llvm-project] bdcbdb: [Attributor] Deduction based on path exploration

Hideto Ueno via All-commits all-commits at lists.llvm.org
Sun Mar 8 22:42:08 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: bdcbdb484829c518511eece0809cc8ce1baa73c8
      https://github.com/llvm/llvm-project/commit/bdcbdb484829c518511eece0809cc8ce1baa73c8
  Author: Hideto Ueno <uenoku.tokotoko at gmail.com>
  Date:   2020-03-09 (Mon, 09 Mar 2020)

  Changed paths:
    M llvm/include/llvm/Analysis/MustExecute.h
    M llvm/include/llvm/Transforms/IPO/Attributor.h
    M llvm/lib/Transforms/IPO/Attributor.cpp
    M llvm/test/Transforms/Attributor/IPConstantProp/openmp_parallel_for.ll
    M llvm/test/Transforms/Attributor/dereferenceable-1.ll
    M llvm/test/Transforms/Attributor/nonnull.ll

  Log Message:
  -----------
  [Attributor] Deduction based on path exploration

This patch introduces the propagation of known information based on path exploration.
For example,
```
int u(int c, int *p){
  if(c) {
     return *p;
  } else {
     return *p + 1;
  }
}
```
An argument `p` is dereferenced whatever c's value is.

For an instruction `CtxI`, we accumulate branch instructions in the must-be-executed-context of `CtxI` and then, we take the conjunction of the successors' known state.

Reviewed By: jdoerfert

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




More information about the All-commits mailing list