Displaying 2 results from an estimated 2 matches for "8f827c45".
2018 May 17
0
Constants propagation into printf format string
On Thu, May 17, 2018 at 3:53 PM, Dávid Bolvanský via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> Hello,
>
> I was thinking about a new possible simplification in InstCombine which
> would transform code like this:
>
> const char * NAME = "Prog";
>
> void printer(char **arr, int len) {
> for (int i = 0; i < len; ++i) {
> printf("%s:
2018 May 17
3
Constants propagation into printf format string
Hello,
I was thinking about a new possible simplification in InstCombine which
would transform code like this:
const char * NAME = "Prog";
void printer(char **arr, int len) {
for (int i = 0; i < len; ++i) {
printf("%s: %s", NAME, arr[i]);
}
}
into
void printer(char **arr, int len) {
for (int i = 0; i < len; ++i) {
printf("Prog: %s", arr[i]);