forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitcfd7f36
committed
jit: Stop emitting some unnecessary instructions
In EEOP_BOOL_AND_STEP* and EEOP_BOOL_OR_STEP*, we emitted pointlesssstore instructions to store to resnull/resvalue values that were justloaded from the same fields in the previous instructions. They willsurely get optimized away by LLVM if any optimizations are enabled,but it's better to not emit them in the first place. InEEOP_BOOL_NOT_STEP, similar story with resnull.In EEOP_NULLIF, when it returns NULL, there was also a redundant storeto resvalue just after storing a 0 to it. The value of resvaluedoesn't matter when resnull is set, so in fact even storing the 0 isunnecessary, but I kept that because we tend to do that for generaltidiness.Author: Xing Guo <higuoxing@gmail.com>Reviewed-by: Andreas Karlsson <andreas@proxel.se>Discussion:https://www.postgresql.org/message-id/CACpMh%2BC%3Dg13WdvzLRSponsVWGgxwDSMzQWM4Gz0heOyaA0-N6g@mail.gmail.com1 parente468ec0 commitcfd7f36
1 file changed
+7
-17
lines changedLines changed: 7 additions & 17 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
720 | 720 |
| |
721 | 721 |
| |
722 | 722 |
| |
723 |
| - | |
724 |
| - | |
725 |
| - | |
726 |
| - | |
727 |
| - | |
728 | 723 |
| |
729 | 724 |
| |
730 | 725 |
| |
| |||
816 | 811 |
| |
817 | 812 |
| |
818 | 813 |
| |
819 |
| - | |
820 |
| - | |
821 |
| - | |
822 |
| - | |
823 |
| - | |
824 | 814 |
| |
825 | 815 |
| |
826 | 816 |
| |
| |||
875 | 865 |
| |
876 | 866 |
| |
877 | 867 |
| |
878 |
| - | |
879 | 868 |
| |
880 | 869 |
| |
881 |
| - | |
| 870 | + | |
882 | 871 |
| |
883 |
| - | |
884 | 872 |
| |
885 | 873 |
| |
886 | 874 |
| |
887 | 875 |
| |
888 | 876 |
| |
889 | 877 |
| |
890 |
| - | |
891 |
| - | |
892 |
| - | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
893 | 884 |
| |
894 | 885 |
| |
895 | 886 |
| |
| |||
1615 | 1606 |
| |
1616 | 1607 |
| |
1617 | 1608 |
| |
1618 |
| - | |
1619 | 1609 |
| |
1620 | 1610 |
| |
1621 | 1611 |
| |
|
0 commit comments
Comments
(0)